修复 角色查询中的重复调用 #1496

pull/1651/head
648540858 2024-10-15 17:17:10 +08:00
parent a87538cb5a
commit b9738c6bfc
1 changed files with 1 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public class RoleController {
// 获取当前登录用户id
int currenRoleId = SecurityUtils.getUserInfo().getRole().getId();
if (currenRoleId != 1) {
// 只用角色id为1才可以删除和添加用户
// 只用角色id为0才可以删除和添加用户
throw new ControllerException(ErrorCode.ERROR403);
}
@ -71,7 +71,6 @@ public class RoleController {
@Operation(summary = "查询角色", security = @SecurityRequirement(name = JwtUtils.HEADER))
public List<Role> all(){
// 获取当前登录用户id
List<Role> allRoles = roleService.getAll();
return roleService.getAll();
}
}