mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
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:
parent
296822c070
commit
f0495cdedc
@ -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">',
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user