提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.enums.permission; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.util.object.ObjectUtils; |
|
4 |
import lombok.AllArgsConstructor; |
|
5 |
import lombok.Getter; |
|
6 |
|
|
7 |
/** |
|
8 |
* 角色标识枚举 |
|
9 |
*/ |
|
10 |
@Getter |
|
11 |
@AllArgsConstructor |
|
12 |
public enum RoleCodeEnum { |
|
13 |
|
|
14 |
SUPER_ADMIN("super_admin", "超级管理员"), |
|
15 |
TENANT_ADMIN("tenant_admin", "租户管理员"), |
|
16 |
CRM_ADMIN("crm_admin", "CRM 管理员"); // CRM 系统专用 |
|
17 |
; |
|
18 |
|
|
19 |
/** |
|
20 |
* 角色编码 |
|
21 |
*/ |
|
22 |
private final String code; |
|
23 |
/** |
|
24 |
* 名字 |
|
25 |
*/ |
|
26 |
private final String name; |
|
27 |
|
|
28 |
public static boolean isSuperAdmin(String code) { |
|
29 |
return ObjectUtils.equalsAny(code, SUPER_ADMIN.getCode()); |
|
30 |
} |
|
31 |
|
|
32 |
} |