Skip to main content

getPermissionCheckConfig

getPermissionCheckConfig(userId, resourceMeta, resource?, action?, throwIfNoPermission?): PermissionCheckConfig

Retrieves a configuration object for permission checking PermissionCheckConfig.

Parameters

userId

string

The id of the user for whom the permission check is performed.

resourceMeta

ResourceMeta

Metadata of the resource ResourceMeta.

resource?

WithId

The resource object for which permission checker is performed.

action?

CrudAction = crudActions.view

The CRUD action to check CrudAction.

throwIfNoPermission?

boolean = false

Whether to throw an exception when permission is denied.

Returns

PermissionCheckConfig