summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-02-08 15:17:30 +0100
committerSimon Rettberg2018-02-08 15:17:30 +0100
commitc23b6957d841d273cf8b0838481ea461a88a8eb4 (patch)
tree5b580dc957a59c5b7fe8773d5310e16b077a2820
parent[exams] Fix table design (diff)
downloadslx-admin-c23b6957d841d273cf8b0838481ea461a88a8eb4.tar.gz
slx-admin-c23b6957d841d273cf8b0838481ea461a88a8eb4.tar.xz
slx-admin-c23b6957d841d273cf8b0838481ea461a88a8eb4.zip
[inc/User] Add locationid 0 to allowed locations in fallback mode
-rw-r--r--inc/user.inc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 81091e1b..b5a364ee 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -47,8 +47,11 @@ class User
$permission = $module ? $module->getIdentifier().".".$permission : $permission;
return PermissionUtil::getAllowedLocations(self::$user['userid'], $permission);
}
- if (self::$user['permissions'] & Permission::get('superadmin'))
- return array_keys(Location::getLocationsAssoc());
+ if (self::$user['permissions'] & Permission::get('superadmin')) {
+ $a = array_keys(Location::getLocationsAssoc());
+ $a[] = 0;
+ return $a;
+ }
return array();
}