12653 check if fine-grained permissions are enabled before retrieving group memberships of users

This commit is contained in:
Sebastian Schuster 2022-06-22 18:19:40 +02:00 committed by Pedro Igor
parent 916cfbbaf1
commit fb978de0d8

View file

@ -587,10 +587,12 @@ class UserPermissions implements UserPermissionEvaluator, UserPermissionManageme
}
private boolean canManageByGroup(UserModel user) {
if (authz == null) return false;
return evaluateHierarchy(user, (group) -> root.groups().canManageMembers(group));
}
private boolean canViewByGroup(UserModel user) {
if (authz == null) return false;
return evaluateHierarchy(user, (group) -> root.groups().getGroupsWithViewPermission(group));
}