Global access rights API
Methods
(static) checkOperation(operationType, contextopt) → {boolean}
Check access right
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationType | string | List of possible operation types and relevant keys of the context object:
| |||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
|
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision as boolean
- Type:
- boolean
(static) enabled() → {boolean}
Returns true if access rights are enabled
- Since
- 6.1.1
- Type:
- boolean
(static) filterElements(elements, operationType, contextopt, decisionopt) → {Array.<$k.SemanticElement>}
Filter semantic elements in array with access rights
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | Array.<$k.SemanticElement> | |||||||||||||||||||||||||||||||||||||||||||
operationType | string | List of possible operation types and relevant keys of the context object:
| ||||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
| |||||||||||||||||||||||||||||||||||||||||
decision | boolean | <optional> | true | true to filter out elements that fail the rights check, false to filter out elements that pass the rights check. |
- Since
- 5.4.0
Unknown operation type
Only semantic elements in array can be processed
Returns the filtered semantic elements
- Type:
- Array.<$k.SemanticElement>
(static) getDecision(operationType, contextopt) → {$k.Decision}
Get access right decision
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationType | string | List of possible operation types and relevant keys of the context object:
| |||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
|
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision
- Type:
- $k.
Decision
(static) setEnabled(enabled)
Enable / disable access rights
| Name | Type | Description |
|---|---|---|
enabled | boolean |
- Since
- 6.1.1
jsDocNoAdminRights
(static) setUserType(userType)
Sets the (super-)type of user instances
| Name | Type | Description |
|---|---|---|
userType | $k. |
- Since
- 6.1.1
jsDocNoAdminRights
If the argument is not a valid user type
(static) userType() → {$k.Type}
Returns the (super-)type of user instances
- Since
- 6.1.1
- Type:
- $k.
Type