IWithPermissionBehavior

Interface

Composable behavior that adds permissions to an entity

Methods

Method Returns Notes
void

Add a permission policy to the entity

IPermissionAccessResponse

Determine if the current user has a specific permission taking into account any entity specific policies

IEntityPermissionPolicy[]

Get all policies for a specific permission

void

Remove a permission policy from the entity

addPermissionPolicy

Interface Method

Add a permission policy to the entity

Parameters

Parameter Type Default Notes
policy Required IEntityPermissionPolicy

Returns

void

checkPermission

Interface Method

Determine if the current user has a specific permission taking into account any entity specific policies

Parameters

Parameter Type Default Notes
permission Required Permission

Returns

getPermissionPolicies

Interface Method

Get all policies for a specific permission

Parameters

Parameter Type Default Notes
permission Required Permission

Returns

removePermissionPolicy

Interface Method

Remove a permission policy from the entity

  • removePermissionPolicy(permission: Permission, id: string) : void

Parameters

Parameter Type Default Notes
permission Required Permission
id Required string

Returns

void

Interface defined in common/src/core/behaviors/IWithPermissionBehavior.ts:10