WriteAppRoleInstance
Assigns and revokes one App Role for users of the Workspace.
Remarks
Section titled “Remarks”Role membership is stored on the user Item. The active principal’s own Roles are fixed for the duration of the execution, so assigning or revoking the current user takes effect from the next execution.
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():
true
Confirms that the active principal holds this Role.
Returns
Section titled “Returns”true
true when the Role is held.
Throws
Section titled “Throws”AssertRoleFailedError when the active principal does not hold this Role.
Inherited from
Section titled “Inherited from”ReadAppRoleInstance.assertRole
assign()
Section titled “assign()”assign(
user):Promise<void>
Adds this Role to a user.
Parameters
Section titled “Parameters”BaseIdentityUserItem | "current"
The user Item to assign, or 'current' for the active principal.
Returns
Section titled “Returns”Promise<void>
Remarks
Section titled “Remarks”Assigning a Role the user already holds leaves the assignment in place. 'current' is rejected in a system context,
which has no principal.
checkRole()
Section titled “checkRole()”checkRole():
boolean
Reports whether the active principal holds this Role.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”revoke()
Section titled “revoke()”revoke(
user):Promise<boolean>
Removes this Role from a user.
Parameters
Section titled “Parameters”The user Item to revoke the Role from.
Returns
Section titled “Returns”Promise<boolean>
true when the user held the Role and it was removed; false when the user did not hold it.

