Class
User details.
Inheritance: WorkflowUserDetailsWorkflowUser
Constructors
constructor
inherited
Class ConstructorWorkflowUserDetails(): WorkflowUserDetailsReturns
WorkflowUserDetailsInherited from WorkflowUser.constructor
Properties
| Property | Type | Notes |
|---|---|---|
emailinherited | string | Email. |
firstNameinherited | string | First name. |
fullNameinherited | string | Full name |
groups | string[] | Groups the user is a member of. |
groupsOwned | string[] | Groups the user is the owner of. |
isAssignableinherited | boolean | Indicates whether the current user has privileges to assign jobs to this user. |
lastNameinherited | string | Last name. |
thumbnailinherited | string | User's avatar. |
usernameinherited | string | Username. |
workflowPrivileges | string[] | Workflow Manager privileges for the user. |
workflowRoles | string[] | Workflow Manager roles associated with the user. |
Methods
| Method | Returns | Notes |
|---|---|---|
hasPrivilege(privilege) | boolean | Checks if the user has the specified privilege. |
isAdministrator() | boolean | Checks if the user is a Workflow Manager administrator. |
hasPrivilege
Class MethodhasPrivilege(privilege: WorkflowPrivilegeType): booleanChecks 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
booleanReturns whether the use has the specified privilege.