]> source.dussan.org Git - nextcloud-server.git/commitdiff
we should check if a user is logged in before we check for admin privilege
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 30 Oct 2013 21:59:31 +0000 (22:59 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 30 Oct 2013 21:59:31 +0000 (22:59 +0100)
lib/private/util.php

index f63884c0f320b63106639a939b8b88c0d80662aa..176eb4bc36955cc8ec7b6be732eca3435e314d60 100755 (executable)
@@ -579,6 +579,7 @@ class OC_Util {
         * @return void
         */
        public static function checkAdminUser() {
+               OC_Util::checkLoggedIn();
                if( !OC_User::isAdminUser(OC_User::getUser())) {
                        header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
                        exit();
@@ -611,6 +612,7 @@ class OC_Util {
         * @return array $groups where the current user is subadmin
         */
        public static function checkSubAdminUser() {
+               OC_Util::checkLoggedIn();
                if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
                        header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
                        exit();