new Role(impl)
Parameters:
Name | Type | Description |
---|---|---|
impl |
RoleImpl | An object that implements role data storage and server requests. |
Members
-
<readonly> data :Object
-
Raw role data received from the server.
Type:
- Object
-
description :string
-
Role description.
Type:
- string
-
name :string
-
Role name.
Type:
- string
-
permissions :Object
-
Role actions are allowed to be performed.
Type:
- Object
Properties:
Name Type Description projectActions
Array.<string> Actions are allowed to be performed at the project level:
update
,createTopic
,createDocument
.topicActions
Array.<string> Actions are allowed to be performed at the topic level:
update
,updateBimSnippet
,updateRelatedTopics
,updateDocumentReferences
,updateFiles
,createComment
,createViewpoint
,delete
.commentActions
Array.<string> Actions are allowed to be performed at the comment level:
update
,delete
.viewpointActions
Array.<string> Actions are allowed to be performed at the viewpoint level:
delete
.odaGroupActions
Array.<string> Actions are allowed to be performed at the members level:
update
,delete
.odaRoleActions
Array.<string> Actions are allowed to be performed at the roles level:
update
,delete
.
Methods
-
<async> checkout()
-
Refresh role data.
Returns:
- Type
- Promise.<Role>
-
<async> delete()
-
Delete a role from the project.
Returns:
- Returns the raw data of a deleted role.
- Type
- Promise.<Object>
-
<async> save()
-
Save role data changes to the server. Call this method to update role data on the server after any changes.
Returns:
- Type
- Promise.<Role>
-
<async> update(data)
-
Update role data on the server.
Parameters:
Name Type Description data
Object Raw role data.
Returns:
- Type
- Promise.<Role>