> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IWorkspaceObjectPermissionsService

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/workspace/objectPermissions/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

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.

**Signature:**

```typescript
export interface IWorkspaceObjectPermissionsService 
```

## Methods

| Method | Description |
| --- | --- |
| [getAccessList(target)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceobjectpermissionsservice/index.md#iworkspaceobjectpermissionsservicegetaccesslist) | **_(ALPHA)_** Returns the current list of grants for the given object. |
| [getAvailableAssignees(target)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceobjectpermissionsservice/index.md#iworkspaceobjectpermissionsservicegetavailableassignees) | **_(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. |
| [getPermissionsForCurrentUser(target)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceobjectpermissionsservice/index.md#iworkspaceobjectpermissionsservicegetpermissionsforcurrentuser) | **_(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. |
| [manageObjectPermissions(target, grantees)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceobjectpermissionsservice/index.md#iworkspaceobjectpermissionsservicemanageobjectpermissions) | **_(ALPHA)_** Applies the given grants. Grantees not included in `grantees` are left unchanged; a grantee with an empty `permissions` array is removed. |

## Method details

### IWorkspaceObjectPermissionsService.getAccessList()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Returns the current list of grants for the given object.

**Signature:**

```typescript
getAccessList(target: IObjectPermissionsObject): Promise<IObjectAccessList>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| target | [IObjectPermissionsObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iobjectpermissionsobject/index.md) | the object whose access to read |

**Returns:**

Promise&lt;[IObjectAccessList](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iobjectaccesslist/index.md)&gt;

### IWorkspaceObjectPermissionsService.getAvailableAssignees()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

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.

**Signature:**

```typescript
getAvailableAssignees(target?: IObjectPermissionsObject): Promise<IAvailableAccessGrantee[]>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| target | [IObjectPermissionsObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iobjectpermissionsobject/index.md) | _(Optional)_ the object being shared, for backends that can narrow to it. Omit when there is no object yet. |

**Returns:**

Promise&lt;[IAvailableAccessGrantee](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iavailableaccessgrantee/index.md)[]&gt;

### IWorkspaceObjectPermissionsService.getPermissionsForCurrentUser()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

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.

**Signature:**

```typescript
getPermissionsForCurrentUser(target: IObjectPermissionsObject): Promise<AccessGranularPermission[]>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| target | [IObjectPermissionsObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iobjectpermissionsobject/index.md) | the object whose permissions to read |

**Returns:**

Promise&lt;[AccessGranularPermission](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.accessgranularpermission/index.md)[]&gt;

### IWorkspaceObjectPermissionsService.manageObjectPermissions()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Applies the given grants. Grantees not included in `grantees` are left unchanged; a grantee with an empty `permissions` array is removed.

**Signature:**

```typescript
manageObjectPermissions(target: IObjectPermissionsObject, grantees: IGranularAccessGrantee[]): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| target | [IObjectPermissionsObject](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iobjectpermissionsobject/index.md) | the object whose access to change |
| grantees | [IGranularAccessGrantee](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igranularaccessgrantee/index.md)[] | grants to apply |

**Returns:**

Promise&lt;void&gt;
