Description |
ลักษณะ |
ตัวอย่างโค้ด |
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
วิธีที่ระบบใช้เพื่อตั้งค่าผู้ใช้ที่ล็อกอินปัจจุบัน |