refactor: 添加未认证和未授权自定义异常处理,printWriter无需手动关闭
This commit is contained in:
1 parent
8c988de05a
commit
dee6fa5cc4
7 files changed
+31
-27
No files matched your search
@@ -211,11 +211,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
@Override
|
||||
public UserAuthInfo getUserAuthInfo(String username) {
|
||||
UserAuthInfo userAuthInfo = this.baseMapper.getUserAuthInfo(username);
|
||||
|
||||
Set<String> roles = userAuthInfo.getRoles();
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
Set<String> perms= menuService.listRolePerms(roles);
|
||||
userAuthInfo.setPerms(perms);
|
||||
if(userAuthInfo!=null){
|
||||
Set<String> roles = userAuthInfo.getRoles();
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
Set<String> perms= menuService.listRolePerms(roles);
|
||||
userAuthInfo.setPerms(perms);
|
||||
}
|
||||
}
|
||||
return userAuthInfo;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user