components.workspace.models¶
Workspace model
-
class
components.workspace.models.Workspace(*args, **kwargs)¶ Bases:
django_mongoengine.document.DjangoFlavor,mongoengine.document.DocumentWorkspace class.
-
exception
DoesNotExist¶ Bases:
mongoengine.errors.DoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
mongoengine.errors.MultipleObjectsReturned
-
clean()¶ Returns:
-
static
get_all()¶ Get all workspaces.
Returns:
-
static
get_all_by_owner(user_id)¶ Get all workspaces created by the given user id.
Parameters: user_id – Returns:
-
static
get_all_other_public_workspaces(user_id)¶ Get all other public workspaces.
Parameters: user_id – Returns:
-
static
get_all_public_workspaces()¶ Get all public workspaces.
Args:
Returns:
-
static
get_all_workspaces_with_read_access_by_user_id(user_id, read_permissions)¶ Get all workspaces with read access for the given user id.
Parameters: - user_id –
- read_permissions –
Returns:
-
static
get_all_workspaces_with_read_access_not_owned_by_user_id(user_id, read_permissions)¶ Get all workspaces with read access not owned by the given user id.
Parameters: - user_id –
- read_permissions –
Returns:
-
static
get_all_workspaces_with_write_access_by_user_id(user_id, write_permissions)¶ Get all workspaces with write access for the given user id.
Parameters: - user_id –
- write_permissions –
Returns:
-
static
get_all_workspaces_with_write_access_not_owned_by_user_id(user_id, write_permissions)¶ Get all workspaces with write access not owned by the given user id.
Parameters: - user_id –
- write_permissions –
Returns:
-
static
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)
-
static
get_global_workspace()¶ Get global workspace.
Returns:
-
static
get_non_public_workspace_owned_by_user_id(user_id)¶ Get the non public workspaces owned by the given user id.
Parameters: user_id – Returns:
-
static
get_public_workspaces_owned_by_user_id(user_id)¶ Get the public workspaces owned the given user id.
Parameters: user_id – Returns:
-
id¶ A field wrapper around MongoDB’s ObjectIds.
-
is_global¶ Get is global.
Returns:
-
is_public¶
-
owner¶
-
read_perm_id¶
-
title¶
-
write_perm_id¶
-
exception