collaboration.permission module¶
Class |
Description |
---|---|
Class representing a permission grant for a user or group on a project. |
- class Permission[source]
Bases:
object
Class representing a permission grant for a user or group on a project.
- __init__(handle: LP_BNCollaborationPermission)[source]
- Parameters:
handle (LP_BNCollaborationPermission) –
- property can_admin: bool
If the permission grants the affect user/group the ability to administer the project
- Returns:
True if permission granted
- property can_edit: bool
If the permission grants the affect user/group the ability to edit files in the project
- Returns:
True if permission granted
- property can_view: bool
If the permission grants the affect user/group the ability to read files in the project
- Returns:
True if permission granted
- property group_id: int | None
Id of affected group
- Returns:
Group id, if this is a group permission. Else, None
- property group_name: str | None
Name of affected group
- Returns:
Group name, if this is a group permission. Else, None
- property id: str
Unique id
- Returns:
Id string
- property level: CollaborationPermissionLevel
Level of permission
- Returns:
Permission level
- property project: RemoteProject
Owning Project
- Returns:
Project object
- property remote: Remote
Owning Remote
- Returns:
Remote object
- property url: str
Web api endpoint url
- Returns:
URL string
Permission¶
- class Permission[source]¶
Bases:
object
Class representing a permission grant for a user or group on a project.
- __init__(handle: LP_BNCollaborationPermission)[source]¶
- Parameters:
handle (LP_BNCollaborationPermission) –
- property can_admin: bool¶
If the permission grants the affect user/group the ability to administer the project
- Returns:
True if permission granted
- property can_edit: bool¶
If the permission grants the affect user/group the ability to edit files in the project
- Returns:
True if permission granted
- property can_view: bool¶
If the permission grants the affect user/group the ability to read files in the project
- Returns:
True if permission granted
- property group_id: int | None¶
Id of affected group
- Returns:
Group id, if this is a group permission. Else, None
- property group_name: str | None¶
Name of affected group
- Returns:
Group name, if this is a group permission. Else, None
- property level: CollaborationPermissionLevel¶
Level of permission
- Returns:
Permission level
- property project: RemoteProject¶
Owning Project
- Returns:
Project object