Class TicketIdentityService

java.lang.Object
com.bytedesk.ticket.identity.TicketIdentityService

@Service public class TicketIdentityService extends Object
工单用户和组管理 使用场景: 用户管理: 同步业务系统用户到 Flowable 管理用户信息和状态 用户认证和授权 组管理: 同步业务系统组织架构 管理工作组和角色 权限分配 关系管理: 维护用户和组的关系 支持多组织架构 灵活的权限控制 这样就能将业务系统的用户和组织架构与 Flowable 的工作流权限体系完美对接。
  • Field Details

    • identityService

      private final org.flowable.idm.api.IdmIdentityService identityService
  • Constructor Details

    • TicketIdentityService

      public TicketIdentityService()
  • Method Details

    • syncUser

      public void syncUser(AgentEntity agent)
      同步用户到Flowable
    • syncWorkgroup

      public void syncWorkgroup(WorkgroupEntity workgroup)
      同步工作组到Flowable
    • syncMembership

      public void syncMembership(String userId, String groupId)
      同步用户和工作组的关系
    • getUser

      public org.flowable.idm.api.User getUser(String userId)
      获取用户
    • getGroup

      public org.flowable.idm.api.Group getGroup(String groupId)
      获取组
    • getUserGroups

      public List<org.flowable.idm.api.Group> getUserGroups(String userId)
      查询用户所在的所有组
    • getGroupUsers

      public List<org.flowable.idm.api.User> getGroupUsers(String groupId)
      查询组内的所有用户
    • isUserInGroup

      public boolean isUserInGroup(String userId, String groupId)
      检查用户是否在指定组中
    • deleteUser

      public void deleteUser(String userId)
      删除用户
    • deleteGroup

      public void deleteGroup(String groupId)
      删除工作组
    • deleteMembership

      public void deleteMembership(String userId, String groupId)
      删除用户和组的关系
    • checkAuthentication

      public boolean checkAuthentication(String userId)
      检查用户认证状态
    • addUserPrivilege

      public void addUserPrivilege(String userId, String privilegeName)
      为用户添加权限
    • addGroupPrivilege

      public void addGroupPrivilege(String groupId, String privilegeName)
      为组添加权限
    • getUserPrivileges

      public List<org.flowable.idm.api.Privilege> getUserPrivileges(String userId)
      获取用户的所有权限
    • hasPrivilege

      public boolean hasPrivilege(String userId, String privilegeName)
      检查用户是否有指定权限
    • removeUserPrivilege

      public void removeUserPrivilege(String userId, String privilegeName)
      删除用户权限
    • removeGroupPrivilege

      public void removeGroupPrivilege(String groupId, String privilegeName)
      删除组权限
    • getUserAuthorities

      public List<org.springframework.security.core.authority.SimpleGrantedAuthority> getUserAuthorities(String userId)
      获取用户的Spring Security权限
    • syncUserFromLDAP

      public void syncUserFromLDAP(String userId)
      从LDAP同步用户
    • syncGroupFromLDAP

      public void syncGroupFromLDAP(String groupId)
      从LDAP同步组
    • authenticate

      public boolean authenticate(String userId, String password)
      LDAP认证