This documentation is for an older version of GoodData.
Go to the latest version of this article.
catalog_permission.
put_declarative_permissions
put_declarative_permissions(workspace_id: str, declarative_workspace_permissions: CatalogDeclarativeWorkspacePermissions)
Sets the permissions for the workspace.
Parameters
name | type | description |
---|---|---|
workspace_id | string | Workspace identification string. e.g. "demo" |
declarative_workspace_permissions | CatalogDeclarativeWorkspacePermissions | Object Containing Workspace Permissions. |
Returns
None
Example
permissions=[CatalogDeclarativeSingleWorkspacePermission(name="ANALYZE", assignee=CatalogAssigneeIdentifier(id="demo", type="user"))]
hierarchy_permissions=[CatalogDeclarativeWorkspaceHierarchyPermission(name="ANALYZE", assignee=CatalogAssigneeIdentifier(id="adminGroup", type="userGroup"))]
declarative_permissions = CatalogDeclarativeWorkspacePermissions(permissions=permissions, hierarchy_permissions=hierarchy_permissions)
# Update permissions on the server with your changes
sdk.catalog_permission.put_declarative_permissions(workspace_id=workspace_id,
declarative_workspace_permissions=declarative_permissions)