From 33c2d8e8333de791affe9780b99c7556e5161ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sun, 25 Jun 2023 22:24:18 +0800 Subject: [PATCH] =?UTF-8?q?reset=20=E5=9B=9E=E6=BB=9A=20=E8=AF=AF=E5=88=A0?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/common/satoken/utils/LoginHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java index bf04571b..99bd6b58 100644 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java +++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java @@ -182,4 +182,9 @@ public class LoginHelper { public static boolean isTenantAdmin(Set rolePermission) { return rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY); } + + public static boolean isTenantAdmin() { + return isTenantAdmin(getLoginUser().getRolePermission()); + } + }