IWorkspaceObjectPermissionsService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
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) Returns what the current user may do with the given object, from every source the backend resolves: their own grants, their user groups, parent workspaces and workspace permissions. | |
(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. See API maturity.
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. See API maturity.
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.getPermissionsForCurrentUser()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Returns what the current user may do with the given object, from every source the backend resolves: their own grants, their user groups, parent workspaces and workspace permissions.
getPermissionsForCurrentUser(target: IObjectPermissionsObject): Promise<AccessGranularPermission[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
target | the object whose permissions to read |
Returns
Promise<AccessGranularPermission[]>
IWorkspaceObjectPermissionsService.manageObjectPermissions()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
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>