Raw permission data received from the server. For more information, see Open Cloud Permissions API.
Owner file ID.
HTTP client instance used to send requests to the REST API server.
Endpoint-specific HTTP headers for the GET
, POST
, PUT
and DELETE
requests. You can add
custom headers at any time.
Endpoint API path relative to the REST API server URL.
Defines what actions are allowed to be performed on a file with this permission:
read
- The ability to read file description, geometry data and properties.readSourceFile
- The ability to download 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.const myFile = client.getFile(myFileId);
const permissions = await myFile.getPermissions();
const projectPermissions = permissions.filter((permission) =>
permission.grantedTo.some((x) => x.project?.id === myProjectId)
);
const newActions = ["read", "readSourceFile", "update"];
await Promise.all(
projectPermissions.map((permission) => {
permission.actions = newActions;
return permission.save();
})
);
Raw permission data received from the server. For more information, see Open Cloud Permissions API.
A list of users, projects, or groups that will get access to the file.
Unique permission ID.
Specifies whether all users have access to the file or not.
Reloads permission data from the server.
Removes a permission from the file.
Returns the raw data of a deleted permission. For more information, see Open Cloud Permissions API.
Saves permission properties changes to the server. Call this method to update permission data on the server after any property changes.
Updates permission data on the server.
Raw permission data. For more information, see Open Cloud Permissions API.
Provides properties and methods for obtaining information about file actions granted to a specific user, project, or group.