模块权限修订,超管权限
ci-userbase-service / build-and-push (push) Successful in 41s

This commit is contained in:
chenxing
2026-08-11 22:43:09 +08:00
parent 4a10fad893
commit f55c865ab1
3 changed files with 21 additions and 3 deletions
@@ -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();