new Permission(impl)
Parameters:
Name | Type | Description |
---|---|---|
impl |
PermissionImpl | An object that implements file permission data storage. |
Members
-
actions :Array.<string>
-
Defines what actions are allowed to be performed on a file with this permission:
read
- The ability to read file description, geometry and properties datareadSourceFile
- The ability to read source filewrite
- The ability to modify file name, description and referencesreadViewpoint
- The ability to read file viewpointscreateViewpoint
- The ability to create file viewpoints
Type:
- Array.<string>
-
<readonly> data :Object
-
Raw permission data received from the server.
Type:
- Object
-
grantedTo :Array.<Principial>
-
A collection of principials that will get access to the file.
Type:
- Array.<Principial>
-
<readonly> id :string
-
Unique permission ID.
Type:
- string
-
public :Boolean
-
Specifies whether all users have access to the file or not.
Type:
- Boolean
Methods
-
<async> checkout()
-
Refresh permission data.
Returns:
- Type
- Promise.<Permission>
-
<async> delete()
-
Remove a permission from a file.
Returns:
- Returns the raw data of a deleted permission.
- Type
- Promise.<Object>
-
<async> save()
-
Save permission data changes to the server. Call this method to update permission data on the server after any changes.
Returns:
- Type
- Promise.<Permission>
-
<async> update(data)
-
Update permission data on the server.
Parameters:
Name Type Description data
Object Raw permission data.
Returns:
- Type
- Promise.<Permission>