Description
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.