Merge pull request #8006 from nextcloud/stable12-7292

[stable12] Fix #4789: Group admins cannot see disabled users
This commit is contained in:
Morris Jobke 2018-01-24 14:19:33 +01:00 committed by GitHub
commit f8da92d8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -302,7 +302,9 @@ class UsersController extends Controller {
// Batch all groups the user is subadmin of when a group is specified // Batch all groups the user is subadmin of when a group is specified
$batch = []; $batch = [];
if($gid === '') { if ($gid !== '' && $gid !== '_disabledUsers' && $gid !== '_everyone') {
$batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
} else {
foreach($subAdminOfGroups as $group) { foreach($subAdminOfGroups as $group) {
$groupUsers = $this->groupManager->displayNamesInGroup($group, $pattern, $limit, $offset); $groupUsers = $this->groupManager->displayNamesInGroup($group, $pattern, $limit, $offset);
@ -310,8 +312,6 @@ class UsersController extends Controller {
$batch[$uid] = $displayName; $batch[$uid] = $displayName;
} }
} }
} else {
$batch = $this->groupManager->displayNamesInGroup($gid, $pattern, $limit, $offset);
} }
$batch = $this->getUsersForUID($batch); $batch = $this->getUsersForUID($batch);