diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-27 14:09:45 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-10-29 11:31:18 +0100 |
commit | c6f6a8758b3f08e47c3a8f45a67d09698376b2e2 (patch) | |
tree | bfd52190961e28ae97fa65a96df05b1fe0390a2f /lib/private/api.php | |
parent | f428d31a5d1f91c6e7aa96fd8550c75c02cc0963 (diff) | |
download | nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.tar.gz nextcloud-server-c6f6a8758b3f08e47c3a8f45a67d09698376b2e2.zip |
Drop OC_SubAdmin and replace usages
Diffstat (limited to 'lib/private/api.php')
-rw-r--r-- | lib/private/api.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index 6d7354c7193..edee30dfc96 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -303,9 +303,13 @@ class OC_API { if(!$user) { return false; } else { - $subAdmin = OC_SubAdmin::isSubAdmin($user); + $userObject = \OC::$server->getUserSession()->getUser(); + if($userObject === null) { + return false; + } + $isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject); $admin = OC_User::isAdminUser($user); - if($subAdmin || $admin) { + if($isSubAdmin || $admin) { return true; } else { return false; |