On Nov 5, 6:02 pm, tazz_ben <[EMAIL PROTECTED]> wrote:
> Anyone at Google:
>
> Ok, so with some trial and error, I've got it working.  A couple of
> things:
>
> 1) Your documentation isn't clear.  According to your document the
> header should look like this:
>
> POST /feeds/acl/private/full/document%3A<your document id> HTTP/1.1
> Host: docs.google.com
> Authorization: <your authorization header here>
>
> But it will fail if you don't include a content type.  So you should
> include that in your example.
>
> Also I think you should make a note that if you are planning on using
> acls you need to include a separate scope item when creating the
> token.  I thought that the ACL would be included in the docs scope
> because the ACL is part of the document, it wasn't until I got the
> error that I added the additional scope.

I'm not sure what you mean by this?  I was able to request a token
for scope=http://docs.google.com/feeds/ which worked with the
ACL feed.  Is that the scope you are using?

>
> 2) There doesn't appear to be any way to add multiple ACLs at once.  I
> tried:
>
> <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> schemas.google.com/acl/2007'>
>    <category scheme='http://schemas.google.com/g/2005#kind'
>      term='http://schemas.google.com/acl/2007#accessRule'/>
>    <gAcl:role value='writer'/>
>    <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> </entry>
> <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> schemas.google.com/acl/2007'>
>    <category scheme='http://schemas.google.com/g/2005#kind'
>      term='http://schemas.google.com/acl/2007#accessRule'/>
>    <gAcl:role value='writer'/>
>    <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> </entry>
>
> --- AND ---
>
> <feed xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> schemas.google.com/acl/2007'>
> <entry>
>    <category scheme='http://schemas.google.com/g/2005#kind'
>      term='http://schemas.google.com/acl/2007#accessRule'/>
>    <gAcl:role value='writer'/>
>    <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> </entry>
> <entry>
>    <category scheme='http://schemas.google.com/g/2005#kind'
>      term='http://schemas.google.com/acl/2007#accessRule'/>
>    <gAcl:role value='writer'/>
>    <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> </entry>
> </feed>
>
> And a few others, all resulted in "permission denied".  I've programed
> around it by submitting a request for each e-mail.  But this can be
> very slow, and it is just wasteful on both our parts.

I think your second example should work, but there may be a reason
creating multiple ACLs wasn't implemented.  I'll look into this one.

Thanks,
Eric

>
> On Nov 4, 4:25 pm, tazz_ben <[EMAIL PROTECTED]> wrote:
>
> > Hi Folks -
>
> > I'm about to work on implementing the new ACL features, but I had a
> > couple things that I'm not clear on.  Ok, the example in the docs is:
>
> > POST /feeds/acl/private/full/document%3A<your document id> HTTP/1.1
> > Host: docs.google.com
> > Authorization: <your authorization header here>
>
> > <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> > schemas.google.com/acl/2007'>
> >   <category scheme='http://schemas.google.com/g/2005#kind'
> >     term='http://schemas.google.com/acl/2007#accessRule'/>
> >   <gAcl:role value='writer'/>
> >   <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> > </entry>
>
> > But lets say I have a list of three people that I want to grant access
> > to, could I do this?
>
> > POST /feeds/acl/private/full/document%3A<your document id> HTTP/1.1
> > Host: docs.google.com
> > Authorization: <your authorization header here>
>
> > <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> > schemas.google.com/acl/2007'>
> >   <category scheme='http://schemas.google.com/g/2005#kind'
> >     term='http://schemas.google.com/acl/2007#accessRule'/>
> >   <gAcl:role value='writer'/>
> >   <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> > </entry>
> > <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> > schemas.google.com/acl/2007'>
> >   <category scheme='http://schemas.google.com/g/2005#kind'
> >     term='http://schemas.google.com/acl/2007#accessRule'/>
> >   <gAcl:role value='writer'/>
> >   <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> > </entry>
> > <entry xmlns="http://www.w3.org/2005/Atom"; xmlns:gAcl='http://
> > schemas.google.com/acl/2007'>
> >   <category scheme='http://schemas.google.com/g/2005#kind'
> >     term='http://schemas.google.com/acl/2007#accessRule'/>
> >   <gAcl:role value='writer'/>
> >   <gAcl:scope type='user' value='[EMAIL PROTECTED]'/>
> > </entry>
>
> > Also what happens if my modification conflicts with an existing role?
> > So let's say in the above that [EMAIL PROTECTED] already is a
> > collaborator.  Would [EMAIL PROTECTED] and
> > [EMAIL PROTECTED] still be granted access?  In essence, do I
> > always have to retrieve the ACL to see what's currently going on, or
> > if my only interest is that there are particular collaborators (and
> > don't care if there is more), is actually faster to just post those
> > permissions?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to