From 9bfd1375e196842313c5b1072975a4680f582d76 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 17 三月 2023 14:16:21 +0800
Subject: [PATCH] 修复用户多角色数据权限可能出现权限抬升的情况
---
src/main/java/com/ruoyi/common/utils/SecurityUtils.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/ruoyi/common/utils/SecurityUtils.java b/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
index 6790ee0..c4eb9b6 100644
--- a/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
+++ b/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
@@ -4,7 +4,7 @@
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.ruoyi.common.constant.HttpStatus;
-import com.ruoyi.common.exception.CustomException;
+import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.framework.security.LoginUser;
/**
@@ -26,7 +26,7 @@
}
catch (Exception e)
{
- throw new CustomException("鑾峰彇鐢ㄦ埛ID寮傚父", HttpStatus.UNAUTHORIZED);
+ throw new ServiceException("鑾峰彇鐢ㄦ埛ID寮傚父", HttpStatus.UNAUTHORIZED);
}
}
@@ -41,7 +41,7 @@
}
catch (Exception e)
{
- throw new CustomException("鑾峰彇閮ㄩ棬ID寮傚父", HttpStatus.UNAUTHORIZED);
+ throw new ServiceException("鑾峰彇閮ㄩ棬ID寮傚父", HttpStatus.UNAUTHORIZED);
}
}
@@ -56,7 +56,7 @@
}
catch (Exception e)
{
- throw new CustomException("鑾峰彇鐢ㄦ埛璐︽埛寮傚父", HttpStatus.UNAUTHORIZED);
+ throw new ServiceException("鑾峰彇鐢ㄦ埛璐︽埛寮傚父", HttpStatus.UNAUTHORIZED);
}
}
@@ -71,7 +71,7 @@
}
catch (Exception e)
{
- throw new CustomException("鑾峰彇鐢ㄦ埛淇℃伅寮傚父", HttpStatus.UNAUTHORIZED);
+ throw new ServiceException("鑾峰彇鐢ㄦ埛淇℃伅寮傚父", HttpStatus.UNAUTHORIZED);
}
}
--
Gitblit v1.9.3