Joget Workflow v6 Released

Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

Description

  • org.joget.workflow.model.service.WorkflowUserManager
  • Under wflow-directory module
  • Utility methods to deal with logged in user

Code Sample

Fields

ROLE_ANONYMOUS
public static final java.lang.String ROLE_ANONYMOUS = "anonymousUser";

Username of an anonymous user

ROLE_ADMIN
public static final java.lang.String ROLE_ADMIN = "ROLE_ADMIN";

Role key of admin

Methods

clearCurrentThreadUser
public void clearCurrentThreadUser()

Method used by system to clear the user 

getCurrentThreadUser
public java.lang.String getCurrentThreadUser()

Method used by system to get current thread user

getCurrentRoles
public java.util.Collection<java.lang.String> getCurrentRoles()

Retrieve the roles of current logged in user 

getCurrentUsername
public java.lang.String getCurrentUsername()

Gets current logged in user

isCurrentUserAnonymous
public boolean isCurrentUserAnonymous()

Check whether the current user is an anonymous

isCurrentUserInRole
public boolean isCurrentUserInRole(java.lang.String role)

Check current user has a role

isSystemUser
public boolean isSystemUser()

Check the current processing is triggered by system

setCurrentThreadUser
public void setSystemThreadUser(boolean isSystemUser)

Set the current processing is trigger by system

setSystemThreadUser
public void setCurrentThreadUser(java.lang.String username)

Method used by system to set current logged in user

 

  • No labels