$parent.canCreate($reference)
canCreate($parent, $reference)
Checks whether the currently logged-in user is allowed to create a new element in the given composition reference of the given parent object and returns a boolean.
This corresponds to the write access to the composition context (the same check that gates adding an element to the reference). The function never fails and never filters.
The check is evaluated for the currently logged-in user and follows the same rules as the implicit permission enforcement: deny-by-default, role inheritance along the security hierarchy, and full access for administrators or executions in a system context.
| Name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| parent | Business object | The container object that will hold the new element. | yes | |
| reference | Attribute | The composition reference (TLStructuredTypePart) into which the element is created. | yes |
Type: Boolean
true if the current user may create an element in the given reference of the parent, false otherwise.
$project.canCreate(`my.module:Project#milestones`)
Output: Whether the logged-in user may add a milestone to the project.