Commit 2ef7612fc2bd06d31a4fd3b3e58e2a895da505cd
1 parent
f4ba6e75
fix(system): 修复 getPermissionInfo 因数据权限过滤导致查不到用户,登录报错
Showing
1 changed file
with
1 additions
and
0 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
| ... | ... | @@ -91,6 +91,7 @@ public class AuthController { |
| 91 | 91 | |
| 92 | 92 | @GetMapping("/get-permission-info") |
| 93 | 93 | @Operation(summary = "获取登录用户的权限信息") |
| 94 | + @DataPermission(enable = false) // 忽略数据权限,避免因为过滤,导致无法查询用户。类似:https://t.zsxq.com/LHnrp | |
| 94 | 95 | public CommonResult<AuthPermissionInfoRespVO> getPermissionInfo() { |
| 95 | 96 | // 1.1 获得用户信息 |
| 96 | 97 | AdminUserDO user = userService.getUser(getLoginUserId()); | ... | ... |