$k. AccessRights

Global access rights API

Methods

(static) checkOperation(operationType, contextopt) → {boolean}

Check access right

Parameters:
NameTypeAttributesDescription
operationTypestring

List of possible operation types and relevant keys of the context object:

createAttributeattributeType, element
createCompleteRelationrelationType, sourceElement, targetElement
createConceptsuperType
createInstancetype
createRelationrelationType, sourceElement, targetElement
deleteAttributeattribute, element
deleteConceptelement
deleteExtensionelement, object
deleteFolderfolder
deleteInstanceelement
deleteRelationrelation, element
modifyAttributeValueattribute
modifyFolderfolder
modifySchemaelement
readAttributeattribute, element
readConcepttype
readExtensionelement
readInstanceobject
readObjectsOfTypetype
validateAttributeValueattributeValue, language, attribute, element
contextobject<optional>

Object containing additional access context. See the operationType parameter for possible property names.

Properties
NameTypeDescription
user$k.User

Specifies a user instead of the current user.

Since
  • 5.4.0
Throws:
Returns:

The decision as boolean

Type: 
boolean

(static) filterElements(elements, operationType, contextopt, decisionopt) → {Array.<$k.SemanticElement>}

Filter semantic elements in array with access rights

Parameters:
NameTypeAttributesDefaultDescription
elementsArray.<$k.SemanticElement>
operationTypestring

List of possible operation types and relevant keys of the context object:

createAttributeattributeType, element
createCompleteRelationrelationType, sourceElement, targetElement
createConceptsuperType
createInstancetype
createRelationrelationType, sourceElement, targetElement
deleteAttributeattribute, element
deleteConceptelement
deleteExtensionelement, object
deleteFolderfolder
deleteInstanceelement
deleteRelationrelation, element
modifyAttributeValueattribute
modifyFolderfolder
modifySchemaelement
readAttributeattribute, element
readConcepttype
readExtensionelement
readInstanceobject
readObjectsOfTypetype
validateAttributeValueattributeValue, language, attribute, element
contextobject<optional>

Object containing additional access context. See the operationType parameter for possible property names.

Properties
NameTypeDescription
user$k.User

Specifies a user instead of the current user.

decisionboolean<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
Throws:
Returns:

Returns the filtered semantic elements

Type: 
Array.<$k.SemanticElement>

(static) getDecision(operationType, contextopt) → {$k.Decision}

Get access right decision

Parameters:
NameTypeAttributesDescription
operationTypestring

List of possible operation types and relevant keys of the context object:

createAttributeattributeType, element
createCompleteRelationrelationType, sourceElement, targetElement
createConceptsuperType
createInstancetype
createRelationrelationType, sourceElement, targetElement
deleteAttributeattribute, element
deleteConceptelement
deleteExtensionelement, object
deleteFolderfolder
deleteInstanceelement
deleteRelationrelation, element
modifyAttributeValueattribute
modifyFolderfolder
modifySchemaelement
readAttributeattribute, element
readConcepttype
readExtensionelement
readInstanceobject
readObjectsOfTypetype
validateAttributeValueattributeValue, language, attribute, element
contextobject<optional>

Object containing additional access context. See the operationType parameter for possible property names.

Properties
NameTypeDescription
user$k.User

Specifies a user instead of the current user.

Since
  • 5.4.0
Throws:
Returns:

The decision

Type: 
$k.Decision