diff options
author | Simon Rettberg | 2018-02-14 14:15:05 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-14 14:15:05 +0100 |
commit | fadc375c510693a87a2e1acb090605bbeed52fe4 (patch) | |
tree | 1bdc7aaba33993dc88c97fb06234371922a924c3 /modules-available/main/page.inc.php | |
parent | [permissionmanager] Fix: False positive for perm validity check (diff) | |
download | slx-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.php | 5 |
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 |