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

# IWorkspaceAccessControlService

- 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/accessControl/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).
> 

Service to manage access to the objects.

**Signature:**

```typescript
export interface IWorkspaceAccessControlService 
```

## Methods

| Method | Description |
| --- | --- |
| [changeAccess(sharedObject, grantees)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceaccesscontrolservice/index.md#iworkspaceaccesscontrolservicechangeaccess) | **_(ALPHA)_** Function that allows to change access (add, edit, revoke) to an object for multiple grantees. If the grantee permissions array is empty, the access is revoked. Otherwise, it is set to the permissions in the array. If backend does not support granular permissions, the array content is used only to check if access should be granted or revoked. |
| [getAccessList(sharedObject)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceaccesscontrolservice/index.md#iworkspaceaccesscontrolservicegetaccesslist) | **_(ALPHA)_** |
| [getAvailableGrantees(sharedObject, search)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceaccesscontrolservice/index.md#iworkspaceaccesscontrolservicegetavailablegrantees) | **_(ALPHA)_** Get list of available grantees for the shared object. |
| [grantAccess(sharedObject, grantees)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceaccesscontrolservice/index.md#iworkspaceaccesscontrolservicegrantaccess) | **_(ALPHA)_** |
| [revokeAccess(sharedObject, grantees)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iworkspaceaccesscontrolservice/index.md#iworkspaceaccesscontrolservicerevokeaccess) | **_(ALPHA)_** |

## Method details

### IWorkspaceAccessControlService.changeAccess()

> **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).
> 

Function that allows to change access (add, edit, revoke) to an object for multiple grantees. If the grantee permissions array is empty, the access is revoked. Otherwise, it is set to the permissions in the array.

If backend does not support granular permissions, the array content is used only to check if access should be granted or revoked.

**Signature:**

```typescript
changeAccess(sharedObject: ObjRef, grantees: IGranularAccessGrantee[]): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sharedObject | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | the ref of object that will have access changed |
| grantees | [IGranularAccessGrantee](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.igranularaccessgrantee/index.md)[] | list of grantees that will have access changed for the shared object |

**Returns:**

Promise&lt;void&gt;

### IWorkspaceAccessControlService.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).
> 

**Signature:**

```typescript
getAccessList(sharedObject: ObjRef): Promise<AccessGranteeDetail[]>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sharedObject | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) |  |

**Returns:**

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

### IWorkspaceAccessControlService.getAvailableGrantees()

> **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).
> 

Get list of available grantees for the shared object.

**Signature:**

```typescript
getAvailableGrantees(sharedObject: ObjRef, search?: string): Promise<IAvailableAccessGrantee[]>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sharedObject | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | the ref of object that will have access changed |
| search | string | _(Optional)_ optional string used to limit the results (matched against name of user group, or first name, last name, or email of user). |

**Returns:**

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

### IWorkspaceAccessControlService.grantAccess()

> **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).
> 

**Signature:**

```typescript
grantAccess(sharedObject: ObjRef, grantees: IAccessGrantee[]): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sharedObject | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) |  |
| grantees | [IAccessGrantee](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iaccessgrantee/index.md)[] |  |

**Returns:**

Promise&lt;void&gt;

### IWorkspaceAccessControlService.revokeAccess()

> **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).
> 

**Signature:**

```typescript
revokeAccess(sharedObject: ObjRef, grantees: IAccessGrantee[]): Promise<void>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sharedObject | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) |  |
| grantees | [IAccessGrantee](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iaccessgrantee/index.md)[] |  |

**Returns:**

Promise&lt;void&gt;
