NAME
Net::Google::DocumentsList::ACL - Access Control List object for Google Documents List Data API
SYNOPSIS
use Net::Google::DocumentsList;
my $client = Net::Google::DocumentsList->new(
username => 'myname@gmail.com',
password => 'p4$$w0rd'
);
# taking one document
my $doc = $client->item;
# getting acls
my @acls = $doc->acls;
for my $acl (@acls) {
# checking acl
if (
$acl->role eq 'writer'
&& $acl->scope->{type} eq 'user'
&& $acl->scope->{value} eq 'foo.bar@gmail.com'
) {
# updating acl
$acl->role('reader');
$acl->scope(
{
type => 'user',
value => 'someone.else@gmail.com',
}
);
# deleting acl
$acl->delete;
}
}
# adding acl
$doc->add_acl(
role => 'reader',
scope => {
type => 'user',
value => 'foo.bar@gmail.com',
}
);
DESCRIPTION
This module represents Access Control List object for Google Documents List Data API.
METHODS
add_acl ( implemented in Net::Google::DocumentsList::Item object )
adds new ACL to document or folder.
$doc->add_acl(
role => 'reader',
scope => {
type => 'user',
value => 'foo.bar@gmail.com',
}
);
delete
delete the acl from attached document or folder.
ATTRIBUTES
role
scope
hashref having 'type' and 'value' keys.
see http://code.google.com/intl/en/apis/documents/docs/3.0/developers_guide_protocol.html#AccessControlLists for details.
AUTHOR
Noubo Danjou <nobuo.danjou@gmail.com>
SEE ALSO
Net::Google::DocumentsList::Role::HasItems
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.