From fadc375c510693a87a2e1acb090605bbeed52fe4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 14 Feb 2018 14:15:05 +0100 Subject: 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 --- inc/dashboard.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/dashboard.inc.php') diff --git a/inc/dashboard.inc.php b/inc/dashboard.inc.php index 3db42efb..59d81c2d 100644 --- a/inc/dashboard.inc.php +++ b/inc/dashboard.inc.php @@ -68,7 +68,7 @@ class Dashboard 'url' => urlencode($_SERVER['REQUEST_URI']), 'langs' => Dictionary::getLanguages(true), 'user' => User::getName(), - 'warning' => User::getName() !== false && User::getLastSeenEvent() < Property::getLastWarningId(), + 'warning' => User::getName() !== false && User::hasPermission('.eventlog.*') && User::getLastSeenEvent() < Property::getLastWarningId(), 'needsSetup' => User::getName() !== false && Property::getNeedsSetup() )); } -- cgit v1.2.3-55-g7522