summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-29 17:34:53 +0200
committerSimon Rettberg2018-03-29 17:34:53 +0200
commit5f43ee22ee0841ce3d237ed52e1b8be0b5af5210 (patch)
tree9f22e62ba2717c7f594d32dc76b55350770c3e33 /modules-available/locationinfo
parent[locationinfo] Fix permission checking: Add missing return statement (diff)
downloadslx-admin-5f43ee22ee0841ce3d237ed52e1b8be0b5af5210.tar.gz
slx-admin-5f43ee22ee0841ce3d237ed52e1b8be0b5af5210.tar.xz
slx-admin-5f43ee22ee0841ce3d237ed52e1b8be0b5af5210.zip
[locationinfo] Properly check permissions when saving new panel
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r--modules-available/locationinfo/page.inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 5ef7a9ed..656c2f81 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -1022,8 +1022,14 @@ class Page_LocationInfo extends Page
}
}
$allowed = User::getAllowedLocations($permission);
+ if (in_array(0, $allowed))
+ return;
if (!empty($allowed)) {
- $locations = explode(',', $panel['locationids']);
+ if (isset($panel['locationids'])) {
+ $locations = explode(',', $panel['locationids']);
+ } else {
+ $locations = [];
+ }
if (!empty($additionalLocations)) {
$locations = array_merge($locations, $additionalLocations);
}