修复 角色查询中的重复调用 #1496
This commit is contained in:
@@ -34,7 +34,7 @@ public class RoleController {
|
|||||||
// 获取当前登录用户id
|
// 获取当前登录用户id
|
||||||
int currenRoleId = SecurityUtils.getUserInfo().getRole().getId();
|
int currenRoleId = SecurityUtils.getUserInfo().getRole().getId();
|
||||||
if (currenRoleId != 1) {
|
if (currenRoleId != 1) {
|
||||||
// 只用角色id为1才可以删除和添加用户
|
// 只用角色id为0才可以删除和添加用户
|
||||||
throw new ControllerException(ErrorCode.ERROR403);
|
throw new ControllerException(ErrorCode.ERROR403);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,6 @@ public class RoleController {
|
|||||||
@Operation(summary = "查询角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "查询角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
public List<Role> all(){
|
public List<Role> all(){
|
||||||
// 获取当前登录用户id
|
// 获取当前登录用户id
|
||||||
List<Role> allRoles = roleService.getAll();
|
|
||||||
return roleService.getAll();
|
return roleService.getAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user