summaryrefslogtreecommitdiffstats
path: root/lib/json.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/json.php')
-rw-r--r--lib/json.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/json.php b/lib/json.php
index 204430411c0..5ab877540d4 100644
--- a/lib/json.php
+++ b/lib/json.php
@@ -57,9 +57,7 @@ class OC_JSON{
* Check if the user is a admin, send json error msg if not
*/
public static function checkAdminUser() {
- self::checkLoggedIn();
- self::verifyUser();
- if( !OC_Group::inGroup( OC_User::getUser(), 'admin' )) {
+ if( !OC_User::isAdminUser(OC_User::getUser())) {
$l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();
@@ -70,9 +68,7 @@ class OC_JSON{
* Check if the user is a subadmin, send json error msg if not
*/
public static function checkSubAdminUser() {
- self::checkLoggedIn();
- self::verifyUser();
- if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
+ if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
$l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();