IWorkspaceObjectPermissionsService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Reads and updates who has access to a single catalog object. The grantee types are shared with the dashboard share service so the same UI primitives work for both flows.
export interface IWorkspaceObjectPermissionsService
Methods
Method | Description |
|---|---|
(ALPHA) Returns the current list of grants for the given object. | |
(ALPHA) Returns the users and groups in the workspace that can be granted access. Excludes the current user. Whether organization admins are excluded depends on the backend. Candidates come from the workspace, so some object types narrow them further and the rest fall back to the workspace listing. | |
(ALPHA) Applies the given grants. Grantees not included in |
Method details
IWorkspaceObjectPermissionsService.getAccessList()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Returns the current list of grants for the given object.
getAccessList(target: IObjectPermissionsObject): Promise<IObjectAccessList>;
Parameters
Parameter | Type | Description |
|---|---|---|
target | the object whose access to read |
Returns
Promise<IObjectAccessList>
IWorkspaceObjectPermissionsService.getAvailableAssignees()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Returns the users and groups in the workspace that can be granted access. Excludes the current user. Whether organization admins are excluded depends on the backend.
Candidates come from the workspace, so some object types narrow them further and the rest fall back to the workspace listing.
getAvailableAssignees(target?: IObjectPermissionsObject): Promise<IAvailableAccessGrantee[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
target | (Optional) the object being shared, for backends that can narrow to it. Omit when there is no object yet. |
Returns
Promise<IAvailableAccessGrantee[]>
IWorkspaceObjectPermissionsService.manageObjectPermissions()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Applies the given grants. Grantees not included in grantees are left unchanged; a grantee with an empty permissions array is removed.
manageObjectPermissions(target: IObjectPermissionsObject, grantees: IGranularAccessGrantee[]): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
target | the object whose access to change | |
grantees | grants to apply |
Returns
Promise<void>