Brian Lawney created LIBCLOUD-889:
-------------------------------------

             Summary: Allow option for returning a detailed json-format ACL 
from libcloud.storage.drivers.google_storage.ex_get_permissions method
                 Key: LIBCLOUD-889
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-889
             Project: Libcloud
          Issue Type: Improvement
          Components: Storage
            Reporter: Brian Lawney
            Priority: Minor


Currently the libcloud.storage.drivers.google_storage.ex_get_permissions method 
(and its associated private _get_container_permissions and 
_get_object_permissions methods ) returns a tuple indicating the permissions of 
a bucket or object.  My use-case requires a detailed ACL for a specific bucket 
or object.  Currently I cannot get that information from this method.  

The current implementation does make ACL requests but does not save the 
response or make use of the response body (json format).  Instead, if the 
request for ACL was successful, it simply returns an integer indicating 
ownership of the bucket/object.  If an exception is raised, that is caught and 
further permissions (e.g. write, read) are subsequently checked.

I propose adding an additional boolean keyword arg with a default False, so the 
call signature would be: 

ex_get_permissions(self, container_name, object_name=None, detailed_acl=False)

If the arg is False, the method returns the same tuple it does now, preserving 
backwards compatibility and not changing the default expected behavior.  If the 
method is called with detailed_acl=True, the method will return a json object 
parsed from the body of the response.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to