From 91880d809655bc7a1fcf1889ddfff69024e31f22 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Tue, 18 Mar 2025 09:28:04 +0800 Subject: [PATCH] ROLE_ADMIN --- .../com/bonus/canteen/core/auth/api/MgrAuthApi.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/auth/api/MgrAuthApi.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/auth/api/MgrAuthApi.java index 94a241e0..01e45ca0 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/auth/api/MgrAuthApi.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/auth/api/MgrAuthApi.java @@ -89,12 +89,13 @@ public class MgrAuthApi { String roleCodeResult = null; for (String roleCode : roleSet) { roleCodeResult = roleCode; - if (roleCode.startsWith(RoleCodeV2Enum.ROLE_ADMIN.key())) { - if (CharSequenceUtil.split(roleCode, "&&").size() > 1) { - roleType = MgrRoleTypeV2Enum.ROLE_ADMIN.getKey(); - } else { - roleType = LeConstants.DATA_DEFAULT_INTEGER; - } + if (roleCode.startsWith(RoleCodeV2Enum.ROLE_ADMIN.key()) || "admin".equals(roleCode)) { + roleType = MgrRoleTypeV2Enum.ROLE_ADMIN.getKey(); +// if (CharSequenceUtil.split(roleCode, "&&").size() > 1) { +// roleType = MgrRoleTypeV2Enum.ROLE_ADMIN.getKey(); +// } else { +// roleType = LeConstants.DATA_DEFAULT_INTEGER; +// } break; } else if (roleCode.startsWith(RoleCodeV2Enum.ROLE_ORG.key())) { roleType = MgrRoleTypeV2Enum.ROLE_ORG.getKey();