Custom admin query key

This commit is contained in:
RainLoop Team 2016-03-22 21:31:26 +03:00
parent 27870cec26
commit 54c3e0732e
4 changed files with 7 additions and 3 deletions

View file

@ -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()))