Skip to content
Snippets Groups Projects
Commit 8f50d768 authored by Victor Dubiniuk's avatar Victor Dubiniuk
Browse files

Merge pull request #5642 from owncloud/fixing-5271-master

 we should check if a user is logged in before we check for admin privil...
parents 77e43058 3f42c890
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment