TemplateRoleInstance
Evaluates a Template Role against one Item at a time.
Remarks
Section titled “Remarks”The Role’s handler derives, from the Item, the principals and App Roles that hold it; the active principal holds the Role when it is one of those principals or holds one of those App Roles. Sudo and system contexts hold every Role.
- Grant access
- TemplateRoleBuilder for declaring a Template Role
- TemplateRoleDefinition for the emitted Definition
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyprn:string
PRN that uniquely identifies this Role within the definition.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”assertRole()
Section titled “assertRole()”assertRole(
item):Promise<true>
Confirms that the active principal holds this Role on an Item.
Parameters
Section titled “Parameters”unknown
The Item to evaluate the Role against.
Returns
Section titled “Returns”Promise<true>
true when the Role is held.
Throws
Section titled “Throws”AssertRoleFailedError when the active principal does not hold this Role on the Item.
checkRole()
Section titled “checkRole()”checkRole(
item):Promise<boolean>
Reports whether the active principal holds this Role on an Item.
Parameters
Section titled “Parameters”unknown
The Item to evaluate the Role against.
Returns
Section titled “Returns”Promise<boolean>

