carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

DocsClient - Incorrect POST URI: batch_process_acl_entries #571

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The URI in the DocsClient.batch_process_acl_entries method is incorrect and 
should point to "/acl/batch" as opposed to just "/acl".

source: 
http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#AC
LBatch

current code:
def batch_process_acl_entries(self, resource, entries, **kwargs):

    *** removed ***

    feed = gdata.docs.data.AclFeed()
    feed.entry = entries
    return super(DocsClient, self).post(
        feed, uri=resource.GetAclLink().href + '/acl', **kwargs)

fixed code:
def batch_process_acl_entries(self, resource, entries, **kwargs):

    *** removed ***

    feed = gdata.docs.data.AclFeed()
    feed.entry = entries
    return super(DocsClient, self).post(
        feed, uri=resource.GetAclLink().href + '/acl/batch', **kwargs)

Original issue reported on code.google.com by ric...@onixnet.com on 12 Dec 2011 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 17 Dec 2011 at 4:58

GoogleCodeExporter commented 9 years ago
Thanks for the patch, and the report. I have submitted the fix for review.

Original comment by afs...@google.com on 17 Dec 2011 at 5:00

GoogleCodeExporter commented 9 years ago
FYI: http://codereview.appspot.com/5493069/

Original comment by afs...@google.com on 17 Dec 2011 at 5:01

GoogleCodeExporter commented 9 years ago
Fixed in r1087, thanks for the patch.

Original comment by afs...@google.com on 17 Dec 2011 at 7:32

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 17 Dec 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Hi,  This fix looks problematic?  As resource.GetAclLink().href returns:

https://docs.google.com/feeds/default/private/full/blah/acl

so we get 

https://docs.google.com/feeds/default/private/full/blah/acl/acl/batch

Or am I missing something?  I had to do:

@@ -718,7 +718,7 @@
     feed = gdata.docs.data.AclFeed()
     feed.entry = entries
     return super(DocsClient, self).post(
-        feed, uri=resource.GetAclLink().href + '/acl/batch', **kwargs)
+        feed, uri=resource.GetAclLink().href + '/batch', **kwargs)

   BatchProcessAclEntries = batch_process_acl_entries

Original comment by akrh...@gmail.com on 11 Jan 2012 at 6:06