Class: Permission

Permission

A permission provides information about file sharing granted to a specific users, group, or project member.


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 data
  • readSourceFile - The ability to read source file
  • write - The ability to modify file name, description and references
  • readViewpoint - The ability to read file viewpoints
  • createViewpoint - 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:

<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>