Skip to content

Commit

Permalink
Merge pull request #104 from joshua-gould/master
Browse files Browse the repository at this point in the history
added invite_users_not_found to updated_workspace_acl
  • Loading branch information
noblem authored Aug 9, 2018
2 parents 9592f81 + ac30bc9 commit 33a7c67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions firecloud/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ def get_workspace_acl(namespace, workspace):
uri = "workspaces/{0}/{1}/acl".format(namespace, workspace)
return __get(uri)

def update_workspace_acl(namespace, workspace, acl_updates):
def update_workspace_acl(namespace, workspace, acl_updates, invite_users_not_found=False):
"""Update workspace access control list.
Args:
Expand All @@ -1193,12 +1193,13 @@ def update_workspace_acl(namespace, workspace, acl_updates):
"email" - Firecloud user email
"accessLevel" - one of "OWNER", "READER", "WRITER", "NO ACCESS"
Example: {"email":"[email protected]", "accessLevel":"WRITER"}
invite_users_not_found (bool): true to invite unregistered users, false to ignore
Swagger:
https://api.firecloud.org/#!/Workspaces/updateWorkspaceACL
"""
uri = "{0}workspaces/{1}/{2}/acl".format(fcconfig.root_url,
namespace, workspace)
uri = "{0}workspaces/{1}/{2}/acl?inviteUsersNotFound={3}".format(fcconfig.root_url,
namespace, workspace, str(invite_users_not_found).lower())
headers = _fiss_agent_header({"Content-type": "application/json"})
# FIXME: create __patch method, akin to __get, __delete etc
return __SESSION.patch(uri, headers=headers, data=json.dumps(acl_updates))
Expand Down

0 comments on commit 33a7c67

Please sign in to comment.