From d360cbcb4b867e6c5ec80a962e39baec8d4c5d8b Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 17 Aug 2015 11:22:06 +0300 Subject: [PATCH] fix restrictedMode check --- application/Espo/Controllers/Admin.php | 4 ++-- application/Espo/Controllers/Extension.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/Espo/Controllers/Admin.php b/application/Espo/Controllers/Admin.php index 5cebd2dd30..027bb02565 100644 --- a/application/Espo/Controllers/Admin.php +++ b/application/Espo/Controllers/Admin.php @@ -61,7 +61,7 @@ class Admin extends \Espo\Core\Controllers\Base public function postActionUploadUpgradePackage($params, $data) { - if ($this->getConfig('restrictedMode')) { + if ($this->getConfig()->get('restrictedMode')) { if (!$this->getUser()->get('isSuperAdmin')) { throw new Forbidden(); } @@ -79,7 +79,7 @@ class Admin extends \Espo\Core\Controllers\Base public function postActionRunUpgrade($params, $data) { - if ($this->getConfig('restrictedMode')) { + if ($this->getConfig()->get('restrictedMode')) { if (!$this->getUser()->get('isSuperAdmin')) { throw new Forbidden(); } diff --git a/application/Espo/Controllers/Extension.php b/application/Espo/Controllers/Extension.php index cbc240f493..d89a9c3ca1 100644 --- a/application/Espo/Controllers/Extension.php +++ b/application/Espo/Controllers/Extension.php @@ -58,7 +58,7 @@ class Extension extends \Espo\Core\Controllers\Record if (!$request->isPost()) { throw new Forbidden(); } - if ($this->getConfig('restrictedMode')) { + if ($this->getConfig()->get('restrictedMode')) { if (!$this->getUser()->get('isSuperAdmin')) { throw new Forbidden(); } @@ -76,7 +76,7 @@ class Extension extends \Espo\Core\Controllers\Record if (!$request->isPost()) { throw new Forbidden(); } - if ($this->getConfig('restrictedMode')) { + if ($this->getConfig()->get('restrictedMode')) { if (!$this->getUser()->get('isSuperAdmin')) { throw new Forbidden(); } @@ -112,7 +112,7 @@ class Extension extends \Espo\Core\Controllers\Record if (!$request->isDelete()) { throw BadRequest(); } - if ($this->getConfig('restrictedMode')) { + if ($this->getConfig()->get('restrictedMode')) { if (!$this->getUser()->get('isSuperAdmin')) { throw new Forbidden(); }