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/json.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/json.php')
-rw-r--r-- | lib/private/json.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/json.php b/lib/private/json.php index ac72f02f609..eba374f4da2 100644 --- a/lib/private/json.php +++ b/lib/private/json.php @@ -114,7 +114,13 @@ class OC_JSON{ * @deprecated Use annotation based ACLs from the AppFramework instead */ public static function checkSubAdminUser() { - 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) { $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ))); exit(); |