summaryrefslogtreecommitdiffstats
path: root/modules-available/main/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2018-02-14 14:15:05 +0100
committerSimon Rettberg2018-02-14 14:15:05 +0100
commitfadc375c510693a87a2e1acb090605bbeed52fe4 (patch)
tree1bdc7aaba33993dc88c97fb06234371922a924c3 /modules-available/main/page.inc.php
parent[permissionmanager] Fix: False positive for perm validity check (diff)
downloadslx-admin-fadc375c510693a87a2e1acb090605bbeed52fe4.tar.gz
slx-admin-fadc375c510693a87a2e1acb090605bbeed52fe4.tar.xz
slx-admin-fadc375c510693a87a2e1acb090605bbeed52fe4.zip
Global: Only show "Warning" badge at the top if user can view event log,
also hide warnings on the main page from modules the user has no access to
Diffstat (limited to 'modules-available/main/page.inc.php')
-rw-r--r--modules-available/main/page.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/main/page.inc.php b/modules-available/main/page.inc.php
index 70296a59..baea8350 100644
--- a/modules-available/main/page.inc.php
+++ b/modules-available/main/page.inc.php
@@ -26,7 +26,10 @@ class Page_Main extends Page
// Warnings
$needSetup = false;
foreach (Hook::load('main-warning') as $hook) {
- include $hook->file;
+ if (Permission::moduleHasPermissions($hook->moduleId)
+ && User::hasPermission('.' . $hook->moduleId . '.*')) {
+ include $hook->file;
+ }
}
// Update warning state