IWithPermissionBehavior
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
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
policy Required | IEntityPermissionPolicy |
Returns
void
checkPermission
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
Get all policies for a specific permission
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission |
Returns
removePermissionPolicy
Remove a permission policy from the entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission | ||
id Required | string |
Returns
void
Interface defined in common/src/core/behaviors/IWithPermissionBehavior.ts:10
Add a permission policy to the entity