Global access rights API
Methods
(static) checkOperation(context) → {Boolean}
Check access right
Name | Type | Description |
---|---|---|
context | object | List of possible operation types: createAttribute { attributeType, element }, createCompleteRelation { relationType, sourceElement, targetElement }, createConcept { superType }, createInstance { type }, createRelation { relationType, sourceElement, targetElement }, delete { element }, deleteAttribute { attribute, element }, deleteConcept { element }, deleteExtension { element, object }, deleteInstance { element }, deleteRelation { relation, element }, modify { element }, modifyAttributeValue { attribute, element }, modifySchema { element }, read { element }, readAttribute { attribute, element }, readConcept { type }, readExtension { element }, readInstance { object }, readObjectsOfType { type }, validateAttributeValue { attributeValue, language, attribute, element }, optional can additionally set the user, e.g. $k.checkAccessRight("read", { "user" : |
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision as boolean
- Type:
- Boolean
(static) filterElements(elements, operationType, contextopt, decisionopt) → {Array.<$k.SemanticElement>}
Filter semantic elements in array with access rights
Name | Type | Attributes | Description |
---|---|---|---|
elements | Array.<$k.SemanticElement> | ||
operationType | string | List of possible operation types: delete, deleteConcept, deleteInstance, modify, modifySchema, read, readExtension, readInstance | |
context | object | <optional> | |
decision | object | <optional> | Default is true |
- 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(context) → {$k.Decision}
Get access right decision
Name | Type | Description |
---|---|---|
context | object | List of possible operation types: createAttribute { attributeType, element }, createCompleteRelation { relationType, sourceElement, targetElement }, createConcept { superType }, createInstance { type }, createRelation { relationType, sourceElement, targetElement }, delete { element }, deleteAttribute { attribute, element }, deleteConcept { element }, deleteExtension { element, object }, deleteInstance { element }, deleteRelation { relation, element }, modify { element }, modifyAttributeValue { attribute, element }, modifySchema { element }, read { element }, readAttribute { attribute, element }, readConcept { type }, readExtension { element }, readInstance { object }, readObjectsOfType { type }, validateAttributeValue { attributeValue, language, attribute, element }, optional can additionally set the user, e.g. $k.checkAccessRight("read", { "user" : |
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision
- Type:
- $k.Decision