use ADMIN_ROLE in stead of ADMIN_RIGHTS, like the rest of the code
This commit is contained in:
parent
b3d40d7e50
commit
796a9d50c2
@ -24,7 +24,7 @@ define('ALIASES', '10');
|
|||||||
define('MAILBOXES', '10');
|
define('MAILBOXES', '10');
|
||||||
|
|
||||||
// Mail Admin Administrator tag
|
// Mail Admin Administrator tag
|
||||||
define('ADMIN_RIGHTS', 'ADMINISTRATOR');
|
define('ADMIN_ROLE', 'ADMINISTRATOR');
|
||||||
|
|
||||||
// Expose virtual mail construct 'vmail' to admins.
|
// Expose virtual mail construct 'vmail' to admins.
|
||||||
define('ALIAS_CONTROL', 'NO');
|
define('ALIAS_CONTROL', 'NO');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenSMTPD Admin Refactor
|
* OpenSMTPD Admin Refactor
|
||||||
* by Jeroen Janssen <jeroen at laylo dot io>
|
* 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
|
// 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 the app specifics
|
||||||
DEFINE('APP_NAME', 'OpenSMTPD Admin Setup Checker');
|
DEFINE('APP_NAME', 'OpenSMTPD Admin Setup Checker');
|
||||||
DEFINE('VERSION', '1.1');
|
DEFINE('VERSION', '1.2');
|
||||||
|
|
||||||
// Start generating the HTML output
|
// Start generating the HTML output
|
||||||
$html = '<html>';
|
$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 .= (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 .= '</tr><tr>';
|
||||||
$html .= '<td><strong>SQL support:</strong></td>';
|
$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 .= '</tr><tr>';
|
||||||
$html .= '<td><strong>Functions:</strong></td>';
|
$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 .= (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 .= (function_exists('session_start')) ? ' - <span style="color:green;">session_start</span></td>' : ' - <span style="color:red;">session_start</span></td>';
|
||||||
$html .= '</tr>';
|
$html .= '</tr>';
|
||||||
$html .= '</table>';
|
$html .= '</table>';
|
||||||
|
$html .= '<p>cp or mv conf.php-sample to conf.php and change it to reflect your setup.</p>';
|
||||||
$html .= '</body>';
|
$html .= '</body>';
|
||||||
$html .= '</html>';
|
$html .= '</html>';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div id="menu">
|
<div id="menu">
|
||||||
<ul>
|
<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>
|
<li><a target="_top" href="password.php"><?php echo $LANG['Menu_user_password']; ?></a></li>
|
||||||
<?php if (VACATION == "YES") { ?>
|
<?php if (VACATION == "YES") { ?>
|
||||||
<li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li>
|
<li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user