[BUGFIX] Hide report notice in about module for editors 68/45168/2
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 7 Dec 2015 12:25:19 +0000 (13:25 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 7 Dec 2015 13:14:14 +0000 (14:14 +0100)
Editors are not allowed to see the reports module, therefore the link
'Please check the status report for more information' does not work.
Furthermore those users can't change anything which is reported, so
don't show this information at all.

Displaying less warnings which can not be changed improve the usability.

Change-Id: I552b34f4bc1e249c51abc166699597b1678a61f9
Resolves: #72084
Releases: master
Reviewed-on: https://review.typo3.org/45168
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>

index a637f51..f1632b9 100644 (file)
@@ -29,6 +29,9 @@ class WarningMessagePostProcessor
     public function displayWarningMessages_postProcess(array &$warningMessages)
+        if (!$GLOBALS['BE_USER']->isAdmin()) {
+            return;
+        }
         // Get highest severity
         $registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Registry::class);
         $highestSeverity = $registry->get('tx_reports', 'status.highestSeverity', null);