This commit is contained in:
@@ -76,9 +76,9 @@ public class UserController {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Integer effectiveGroupId = resolveEffectiveGroupId(userId, schId);
|
||||
if (effectiveGroupId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 注意:超管即使没有学校/归属组,service.findUserPermissionTree 内部也会走超管短路返回全部权限,
|
||||
// 因此这里不能因 effectiveGroupId 为 null 直接返回空,否则超管在 oapi/user/modules 永远拿不到权限;
|
||||
// 普通用户无组/无学校时,findUserPermissionTree 同样会返回空列表,行为一致。
|
||||
List<UserPermissionCategoryVo> tree = groupAuthzService.findUserPermissionTree(effectiveGroupId, userId);
|
||||
if (tree == null || tree.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
|
||||
Reference in New Issue
Block a user