Merge branch 'ent-11547-diferenciar-about-para-usuarios-no-admin' into 'develop'

Ent 11547 diferenciar about para usuarios no admin

See merge request artica/pandorafms!6265
This commit is contained in:
Rafael Ameijeiras 2023-08-23 14:34:23 +00:00
commit 7a916dcb27
1 changed files with 224 additions and 219 deletions

View File

@ -950,11 +950,14 @@ if (is_ajax()) {
$dialog = '
<div id="about-tabs" class="invisible overflow-hidden">
<ul>
<li><a href="#tab-general-view">'.__('Information').'</a></li>
<li><a href="#tab-database">'.__('Database').'</a></li>
<li><a href="#tab-general-view">'.__('Information').'</a></li>';
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || $config['is_admin']['admin'] === true) {
$dialog .= '<li><a href="#tab-database">'.__('Database').'</a></li>
<li><a href="#tab-system-info">'.__('System Info').'</a></li>
<li><a href="#tab-php-system">'.__('PHP System').'</a></li>
<li class="ui-tabs-close-button" style="float:right!important;">
<li><a href="#tab-php-system">'.__('PHP System').'</a></li>';
}
$dialog .= '<li class="ui-tabs-close-button" style="float:right!important;">
<img id="about-close" style="cursor: pointer;" src="'.ui_get_full_url('/include/styles/images/dialog-titlebar-close.png', false, false, false).'" alt="'.__('Close').'" title="'.__('Close').'" width="25px">
</li>
</ul>
@ -986,7 +989,7 @@ if (is_ajax()) {
$dialog .= '<p><b><a href="https://pandorafms.com/contact/" target="_blank">'.__('Contact Pandora FMS for official support contract.').'</a></b></p>';
}
if (((bool) check_acl($config['id_user'], 0, 'PM') === true) && (is_metaconsole() === false)) {
if (((bool) check_acl($config['id_user'], 0, 'PM') === true || $config['is_admin']['admin'] === true) && (is_metaconsole() === false)) {
$dialogButtons = [];
$dialogButtons[] = html_print_button(
@ -1028,8 +1031,9 @@ if (is_ajax()) {
</tbody>
</table>
<p class="trademark-copyright">Trademark and copyright 2004 - '.date('Y').' <a href="https://pandorafms.com/" target="_blank">Pandora FMS</a>. All rights reserved</p>
</div>
<div id="tab-database" class="div-scroll">
</div>';
if ((bool) check_acl($config['id_user'], 0, 'PM') === true || $config['is_admin']['admin'] === true) {
$dialog .= '<div id="tab-database" class="div-scroll">
<table class="table-about">
<tbody style="text-align: left;">
<tr>
@ -1244,6 +1248,7 @@ if (is_ajax()) {
</div>
</div>
';
}
echo $dialog;
}