Class
User details.
Constructors
constructor
new WorkflowUserDetails(): WorkflowUserDetails
Returns
WorkflowUserDetails
Properties
Property | Type | Notes |
---|---|---|
email inherited | string | Email. |
firstName inherited | string | First name. |
fullName inherited | string | Full name |
string[] | Groups the user is a member of. | |
string[] | Groups the user is the owner of. | |
isAssignable inherited | boolean | Indicates whether the current user has privileges to assign jobs to this user. |
lastName inherited | string | Last name. |
thumbnail inherited | string | User's avatar. |
username inherited | string | Username. |
string[] | Workflow Manager privileges for the user. | |
string[] | Workflow Manager roles associated with the user. |
isAssignable
isAssignable: boolean
Indicates whether the current user has privileges to assign jobs to this user.
Methods
Method | Returns | Notes |
---|---|---|
hasPrivilege(privilege) | boolean | Checks if the user has the specified privilege. |
boolean | Checks if the user is a Workflow Manager administrator. |
hasPrivilege
Class MethodhasPrivilege(privilege: WorkflowPrivilegeType): boolean
Checks if the user has the specified privilege.
const canCreateJobs = userDetails.hasPrivilege(WorkflowPrivilegeType.JobCreate);
const canAddUpdateAttachments = userDetails.hasPrivilege(WorkflowPrivilegeType.JobUpdateAttachments);
const canUpdateHolds = userDetails.hasPrivilege(WorkflowPrivilegeType.JobUpdateHolds);
Parameters
Parameter | Type | Notes |
---|---|---|
privilege | WorkflowPrivilegeType | The privilege to check. |
Returns
boolean
Returns whether the use has the specified privilege.
email: string
Email.