Description

ลักษณะ

Code Sample

ตัวอย่างโค้ด

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();

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

วิธีที่ระบบใช้เพื่อตั้งค่าผู้ใช้ที่ล็อกอินปัจจุบัน