$k. AccessRights

Global access rights API

Methods

(static) checkOperation(operationType, context) → {Boolean}

Check access right

Parameters:
NameTypeDescription
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

Object containing additional access context.

  • user: specifiy a user ($k.User) instead of the current user
Since
  • 5.4.0
Throws:
Returns:

The decision as boolean

Type: 
Boolean

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

Filter semantic elements in array with access rights

Parameters:
NameTypeAttributesDescription
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

Object containing additional access context.

  • user: specifiy a user ($k.User) instead of the current user
decisionobject<optional>

Default is true

Since
  • 5.4.0
Throws:
Returns:

Returns the filtered semantic elements

Type: 
Array.<$k.SemanticElement>

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

Get access right decision

Parameters:
NameTypeDescription
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

Object containing additional access context.

  • user: specifiy a user ($k.User) instead of the current user
Since
  • 5.4.0
Throws:
Returns:

The decision

Type: 
$k.Decision