PermissionsDataSource
Constructors
new PermissionsDataSource()
new PermissionsDataSource():
PermissionsDataSource
Returns
Source
Methods
check()
check(
e
,permission
):Promise
<boolean
>
Checks if current user has permission {permission} for entity {e}
Parameters
Parameter | Type | Description |
---|---|---|
e | Entity | Entity to check permission for |
permission | "Edit" | "View" | "Share" | "Delete" | Permission type |
Returns
Promise
<boolean
>
Result
Source
get()
get(
e
):Promise
<Map
<string
,Group
[]>>
Gets all the permissions granted on entity
Parameters
Parameter | Type | Description |
---|---|---|
e | Entity |
Returns
Promise
<Map
<string
, Group
[]>>
permissions
Source
grant()
grant(
e
,g
,edit
):Promise
<any
>
Grants permission on entity to the group
Parameters
Parameter | Type | Description |
---|---|---|
e | Entity | |
g | Group | |
edit | boolean | allow to edit entity |
Returns
Promise
<any
>
Source
revoke()
revoke(
g
,e
):Promise
<any
>
Revokes permission on entity from the group
Parameters
Parameter | Type | Description |
---|---|---|
g | Group | |
e | Entity |
Returns
Promise
<any
>