Skip to content

Commit

Permalink
Support optional and prefixed folder_id in preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienthebo committed Feb 21, 2019
1 parent 3950915 commit 926009c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ def validate(self, credentials):
)

body = {"permissions": self.permissions}
resource = "folders/" + self.folder_id
if self.folder_id.startswith("folders/"):
resource = self.folder_id
else:
resource = "folders/" + self.folder_id

request = service.folders().testIamPermissions(
resource=resource,
Expand Down

0 comments on commit 926009c

Please sign in to comment.