use ADMIN_ROLE in stead of ADMIN_RIGHTS, like the rest of the code

This commit is contained in:
mischa 2023-10-14 14:47:02 +00:00
parent b3d40d7e50
commit 796a9d50c2
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ define('ALIASES', '10');
define('MAILBOXES', '10');
// Mail Admin Administrator tag
define('ADMIN_RIGHTS', 'ADMINISTRATOR');
define('ADMIN_ROLE', 'ADMINISTRATOR');
// Expose virtual mail construct 'vmail' to admins.
define('ALIAS_CONTROL', 'NO');

View File

@ -2,7 +2,7 @@
/**
* OpenSMTPD Admin Refactor
* by Jeroen Janssen <jeroen at laylo dot io>
* Copyright (c) 2022 LAYLO
* Copyright (c) 2022-2023 LAYLO
*/
// Check whether the configuration file exists - bail if that is the case
@ -12,7 +12,7 @@ if (file_exists(realpath("./conf.php"))) {
}
// Define the app specifics
DEFINE('APP_NAME', 'OpenSMTPD Admin Setup Checker');
DEFINE('VERSION', '1.1');
DEFINE('VERSION', '1.2');
// Start generating the HTML output
$html = '<html>';
@ -30,14 +30,14 @@ $html .= '<td><strong>PHP version:</strong></td>';
$html .= (version_compare(PHP_VERSION, '7.4.0') >= 0) ? '<td><span style="color:green;">' . phpversion() . '</td>' : '<td><span style="color:red;">' . phpversion() . '</span></td>';
$html .= '</tr><tr>';
$html .= '<td><strong>SQL support:</strong></td>';
$html .= (extension_loaded('mysqli')) ? '<td><span style="color:green;">MySQL/MariaDB</span>' : '<td><span style="color:red;">MySQL/MariaDB</span>';
$html .= (extension_loaded('PDO')) ? '<td><span style="color:green;">PDO - MySQL/MariaDB</span>' : '<td><span style="color:red;">PDO - MySQL/MariaDB</span>';
$html .= '</tr><tr>';
$html .= '<td><strong>Functions:</strong></td>';
$html .= (extension_loaded('pcre')) ? '<td><span style="color:green;">pcre</span>' : '<td><span style="color:red;">pcre</span>';
$html .= (function_exists('get_magic_quotes_gpc')) ? ' - <span style="color:green;">get_magic_quotes_gpc</span>' : ' - <span style="color:red;">get_magic_quotes_gpc</span>';
$html .= (function_exists('session_start')) ? ' - <span style="color:green;">session_start</span></td>' : ' - <span style="color:red;">session_start</span></td>';
$html .= '</tr>';
$html .= '</table>';
$html .= '<p>cp or mv conf.php-sample to conf.php and change it to reflect your setup.</p>';
$html .= '</body>';
$html .= '</html>';

View File

@ -1,6 +1,6 @@
<div id="menu">
<ul>
<?php if (count($list_domains) == 0) { ?>
<?php if (count($list_domains) == 0 && $ROLE != ADMIN_ROLE) { ?>
<li><a target="_top" href="password.php"><?php echo $LANG['Menu_user_password']; ?></a></li>
<?php if (VACATION == "YES") { ?>
<li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li>