Permissions client

The SDK provides a Permissions client to retrieve the permission for a specific entity.

Note

In the following code examples, the client variable refers to the ContentHubClient instance. When using the JavaScript SDK, you can choose your own variable name, but it is called client at instantiation in the documentation.

Get permissions for an entity

For example, the following snippet gets the Superuser user permissions for the 9490 entity:

RequestResponse
const permissions = await client.permissions.getPermissionsAsync(9490);

Get permissions a specific user has for an entity

For example, the following snippet gets the user id user permissions for the 9490 entity:

RequestResponse
const permissions = await client.permissions.getPermissionsAsync(9490, user id );

Do you have some feedback for us?

If you have suggestions for improving this article,