Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Code Block | ||
---|---|---|
| ||
import org.joget.apps.app.service.AppUtil;
import org.joget.workflow.model.service.WorkflowUserManager;
WorkflowUserManager workflowUserManager = (WorkflowUserManager) AppUtil.getApplicationContext().getBean("workflowUserManager");
String username = workflowUserManager.getCurrentUsername(); |
public static final java.lang.String ROLE_ANONYMOUS = "anonymousUser";
Username of an anonymous user
public static final java.lang.String ROLE_ADMIN = "ROLE_ADMIN";
Role key of admin
public void clearCurrentThreadUser()
Method used by system to clear the user
public java.lang.String getCurrentThreadUser()
Method used by system to get current thread user
public java.util.Collection<java.lang.String> getCurrentRoles()
Retrieve the roles of current logged in user
public java.lang.String getCurrentUsername()
Gets current logged in user
public boolean isCurrentUserAnonymous()
Check whether the current user is an anonymous
public boolean isCurrentUserInRole(java.lang.String role)
Check current user has a role
public boolean isSystemUser()
Check the current processing is triggered by system
public void setSystemThreadUser(boolean isSystemUser)
Set the current processing is trigger by system
public void setCurrentThreadUser(java.lang.String username)
Method used by system to set current logged in user