system: only show crash reports to admins

We could check admin or page access rights, but in the end we just
want to avoid showing a banner that links to a page that is not
accessible in 99% of the cases if specific dashboard access was
granted.
This commit is contained in:
Franco Fichtner 2019-05-11 10:40:23 +02:00
parent 296822c070
commit f0495cdedc
2 changed files with 5 additions and 1 deletions

View File

@ -473,6 +473,10 @@ date_default_timezone_set($timezone);
function get_crash_report($pedantic = false)
{
if (!userIsAdmin($_SESSION['Username'])) {
return;
}
$savemsg = sprintf(
gettext('A problem was detected. Click %shere%s for more information.'),
'<a href="/crash_reporter.php">',

View File

@ -332,7 +332,7 @@ include("fbegin.inc");?>
<?php
print_service_banner('livecd');
$crash_report = get_crash_report();
if ($crash_report != '') {
if (!empty($crash_report)) {
print_info_box($crash_report);
}?>
</div>