components.workspace.api¶
Workspace API
-
components.workspace.api.can_group_read_workspace(workspace, group)¶ Check if group has read permission on workspace.
Parameters: - workspace –
- group –
Return:
-
components.workspace.api.can_group_write_workspace(workspace, group)¶ Check if group has write permission on workspace.
Parameters: - workspace –
- group –
Return:
-
components.workspace.api.can_user_read_workspace(workspace, user)¶ Check if user has read permission on workspace.
Parameters: - workspace –
- user –
Return:
-
components.workspace.api.can_user_write_workspace(workspace, user)¶ Check if user has write permission on workspace.
Parameters: - workspace –
- user –
Return:
-
components.workspace.api.create_and_save(title, owner_id=None, is_public=False)¶ Create and save a workspace. It will also create permissions.
Parameters: - owner_id –
- title –
- is_public –
Returns:
-
components.workspace.api.get_all()¶ Get all workspace.
Returns:
-
components.workspace.api.get_all_by_owner(user)¶ Get all workspaces created by the given user.
Parameters: user – Returns:
-
components.workspace.api.get_all_other_public_workspaces(user)¶ Get all other public workspaces.
Parameters: user – Returns:
-
components.workspace.api.get_all_public_workspaces()¶ Get all public workspaces.
Args:
Returns:
-
components.workspace.api.get_all_workspaces_with_read_access_by_user(user)¶ Get all workspaces with read access for the given user.
Parameters: user – Returns:
-
components.workspace.api.get_all_workspaces_with_read_access_not_owned_by_user(user)¶ Get the all workspaces with read access not owned by the given user.
Parameters: user – Returns:
-
components.workspace.api.get_all_workspaces_with_write_access_by_user(user)¶ Get all workspaces with write access for the given user.
Parameters: user – Returns:
-
components.workspace.api.get_all_workspaces_with_write_access_not_owned_by_user_id(user)¶ Get the all workspaces with write access not owned by the given user.
Parameters: user – Returns:
-
components.workspace.api.get_by_id(workspace_id)¶ Return the workspace with the given id.
Parameters: workspace_id – Returns: Workspace object with the given id Return type: Workspace (obj)
-
components.workspace.api.get_by_id_list(list_workspace_id)¶ Return a list of workspaces with the given id list.
Parameters: list_workspace_id – Returns:
-
components.workspace.api.get_global_workspace()¶ Get global workspace.
Return:
-
components.workspace.api.get_list_group_can_access_workspace(workspace, user)¶ Get the list of groups that have either read or write access to workspace.
Parameters: - workspace –
- user –
Returns:
-
components.workspace.api.get_list_user_can_access_workspace(workspace, user)¶ Get the list of users that have either read or write access to workspace.
Parameters: - workspace –
- user –
Returns:
-
components.workspace.api.get_non_public_workspace_owned_by_user(user)¶ Get the non public workspaces owned by the given user.
Parameters: user – Returns:
-
components.workspace.api.get_public_workspaces_owned_by_user(user)¶ Get the public workspaces owned the given user.
Parameters: user – Returns:
-
components.workspace.api.is_workspace_global(workspace)¶ Check if the workspace is global public.
Parameters: workspace – Return:
-
components.workspace.api.is_workspace_public(workspace)¶ Check if the workspace is public.
Parameters: workspace – Return:
-
components.workspace.api.set_title(workspace, new_title)¶ Set the workspace’s title.
Parameters: - workspace –
- new_title –
Returns: