WriteAppRoleInstance
Defined in: runtime/app.ts:30
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyprn:string
Defined in: runtime/role.ts:5
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”assertRole()
Section titled “assertRole()”assertRole():
true
Defined in: runtime/app.ts:21
Asserts that the current, active instance has the current role. If successful, this will return true. Otherwise it will throw an Error.
Returns
Section titled “Returns”true
Inherited from
Section titled “Inherited from”ReadAppRoleInstance.assertRole
assign()
Section titled “assign()”assign(
user):Promise<void>
Defined in: runtime/app.ts:35
Assigns the given user to this role. Note that assignments do not affect the current session/user.
Parameters
Section titled “Parameters”BaseIdentityUserItem | "current"
Returns
Section titled “Returns”Promise<void>
checkRole()
Section titled “checkRole()”checkRole():
boolean
Defined in: runtime/app.ts:27
Checks that the current, active instance has the current role; returning true/false if that role is present.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”revoke()
Section titled “revoke()”revoke(
user):Promise<boolean>
Defined in: runtime/app.ts:41
Revokes the user from this role. Returns true if this was successful; false if the user did not have the role.
Parameters
Section titled “Parameters”BaseIdentityUserItem
Returns
Section titled “Returns”Promise<boolean>