summaryrefslogtreecommitdiffstats
path: root/lib/private/app.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-10-27 14:09:45 +0100
committerLukas Reschke <lukas@owncloud.com>2015-10-29 11:31:18 +0100
commitc6f6a8758b3f08e47c3a8f45a67d09698376b2e2 (patch)
treebfd52190961e28ae97fa65a96df05b1fe0390a2f /lib/private/app.php
parentf428d31a5d1f91c6e7aa96fd8550c75c02cc0963 (diff)
downloadnextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.tar.gz
nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.zip
Drop OC_SubAdmin and replace usages
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index d7e62dfd852..c6e235eda4d 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -430,7 +430,12 @@ class OC_App {
);
//SubAdmins are also allowed to access user management
- if (OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
+ $userObject = \OC::$server->getUserSession()->getUser();
+ $isSubAdmin = false;
+ if($userObject !== null) {
+ $isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject);
+ }
+ if ($isSubAdmin) {
// admin users menu
$settings[] = array(
"id" => "core_users",