PermissionManager
Permission Manager class that provides permission behavior for a given entity
Methods
Method | Returns | Notes |
---|---|---|
|
PermissionManager |
Create a new PermissionManager instance from configuration and context |
|
void |
Set a permission for the given entity |
|
boolean |
Check if the user has a specific permission in the context of an entity |
|
IHubPermission[] |
Get all the permission definitions for the specific permission |
|
void |
Remove a permission by targetId |
|
IHubPermission[] |
Return the current permissions as a JSON object |
fromJson
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
permissions Required | IHubPermission[] | ||
context Required | IArcGISContext |
Returns
add
Set a permission for the given entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | IHubPermission |
Returns
void
check
Check if the user has a specific permission in the context of an entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | HubPermission |
Returns
boolean
get
Get all the permission definitions for the specific permission
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | HubPermission |
Returns
remove
Remove a permission by targetId
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | HubPermission | ||
targetId Required | string |
Returns
void
Class defined in common/src/core/PermissionManager.ts:14
Create a new PermissionManager instance from configuration and context