mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Custom admin query key
This commit is contained in:
parent
27870cec26
commit
54c3e0732e
4 changed files with 7 additions and 3 deletions
|
|
@ -1402,6 +1402,7 @@ class Actions
|
|||
'Auth' => false,
|
||||
'AccountHash' => '',
|
||||
'WebPath' => \RainLoop\Utils::WebPath(),
|
||||
'AdminPath' => \strtolower($oConfig->Get('security', 'admin_panel_key', 'admin')),
|
||||
'WebVersionPath' => \RainLoop\Utils::WebVersionPath(),
|
||||
'AccountSignMe' => false,
|
||||
'AuthAccountHash' => '',
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
'force_two_factor_auth' => array(false),
|
||||
'allow_universal_login' => array(false),
|
||||
'admin_panel_host' => array(''),
|
||||
'admin_panel_key' => array('admin'),
|
||||
'core_install_access_domain' => array('')
|
||||
),
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ class Service
|
|||
$sAdminPanelHost = $this->oActions->Config()->Get('security', 'admin_panel_host', '');
|
||||
if (empty($sAdminPanelHost))
|
||||
{
|
||||
$bAdmin = !empty($aPaths[0]) && \in_array(\strtolower($aPaths[0]), array('admin', 'cp'));
|
||||
$sAdminPanelKey = \strtolower($this->oActions->Config()->Get('security', 'admin_panel_key', 'admin'));
|
||||
$bAdmin = !empty($aPaths[0]) && $aPaths[0] === $sAdminPanelKey;
|
||||
}
|
||||
else if (empty($aPaths[0]) &&
|
||||
\MailSo\Base\Utils::StrToLowerIfAscii($sAdminPanelHost) === \MailSo\Base\Utils::StrToLowerIfAscii($this->oHttp->GetHost()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue