TemplateRoleCallback
TemplateRoleCallback = (
item) =>Promise<string[]>
Resolves who holds a Template Role for one Item.
Parameters
Section titled “Parameters”Item whose Role membership is being resolved.
Returns
Section titled “Returns”Promise<string[]>
Principal ids and App Role PRNs that hold the Role.
Remarks
Section titled “Remarks”Return the access identifiers that hold the Role for item: principal Item ids, App Role PRNs,
or both. The check passes when the current principal’s id is listed or the principal holds any
listed App Role. The callback receives only the Item, so derive identifiers from its Properties
and Relations.
Example
Section titled “Example”An owner Role resolved from a Property
template.addRole('owner', async (item) => [String(item.properties.owner), adminRole.prn]);
