diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-23 13:01:40 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-24 17:52:15 +0200 |
commit | ddd1c8bc8689017559f6d6af36898fb7ddb28adb (patch) | |
tree | bb5ae0a068641a67b9f43b2a133b11d9683f0bb8 /apps/provisioning_api | |
parent | 55184158292d3b4d4835b3bdb724bb19edf88355 (diff) | |
download | nextcloud-server-ddd1c8bc8689017559f6d6af36898fb7ddb28adb.tar.gz nextcloud-server-ddd1c8bc8689017559f6d6af36898fb7ddb28adb.zip |
Disabled fix since new users list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AUserData.php | 4 | ||||
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 4 | ||||
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 6c4967a6c3b..7a90e7a0a48 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -90,12 +90,12 @@ abstract class AUserData extends OCSController { } // Should be at least Admin Or SubAdmin! - if( $this->groupManager->isAdmin($currentLoggedInUser->getUID()) + if ($this->groupManager->isAdmin($currentLoggedInUser->getUID()) || $this->groupManager->getSubAdmin()->isUserAccessible($currentLoggedInUser, $targetUserObject)) { $data['enabled'] = $this->config->getUserValue($targetUserObject->getUID(), 'core', 'enabled', 'true') === 'true'; } else { // Check they are looking up themselves - if($currentLoggedInUser->getUID() !== $targetUserObject->getUID()) { + if ($currentLoggedInUser->getUID() !== $targetUserObject->getUID()) { return $data; } } diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index 9d64bb2251a..5114c6f01d5 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -207,6 +207,10 @@ class GroupsController extends AUserData { // Do not insert empty entry if(!empty($userData)) { $usersDetails[$userId] = $userData; + } else { + // Logged user does not have permissions to see this user + // only showing its id + $usersDetails[$userId] = ['id' => $userId]; } } return new DataResponse(['users' => $usersDetails]); diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 21f5382d010..38d0e08ff8b 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -180,6 +180,10 @@ class UsersController extends AUserData { // Do not insert empty entry if (!empty($userData)) { $usersDetails[$userId] = $userData; + } else { + // Logged user does not have permissions to see this user + // only showing its id + $usersDetails[$userId] = ['id' => $userId]; } } |