diff options
author | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-01-26 21:51:18 +0100 |
---|---|---|
committer | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-01-26 21:51:18 +0100 |
commit | b1b2eafa50db54b2613cf2bc52bfab2015d67b2f (patch) | |
tree | 68992916824e3bdd4c6ba9ab5af955420bfd8123 /lib/json.php | |
parent | a26d50640fc4a2524255c85b10fb010676b3e22d (diff) | |
parent | c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb (diff) | |
download | nextcloud-server-b1b2eafa50db54b2613cf2bc52bfab2015d67b2f.tar.gz nextcloud-server-b1b2eafa50db54b2613cf2bc52bfab2015d67b2f.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
apps/files_external/lib/config.php
Diffstat (limited to 'lib/json.php')
-rw-r--r-- | lib/json.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/json.php b/lib/json.php index 204430411c0..f929e958957 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(); @@ -80,19 +76,6 @@ class OC_JSON{ } /** - * Check if the user verified the login with his password - */ - public static function verifyUser() { - if(OC_Config::getValue('enhancedauth', false) === true) { - if(!isset($_SESSION['verifiedLogin']) OR $_SESSION['verifiedLogin'] < time()) { - $l = OC_L10N::get('lib'); - self::error(array( 'data' => array( 'message' => $l->t('Authentication error') ))); - exit(); - } - } - } - - /** * Send json error msg */ public static function error($data = array()) { |