fix restrictedMode check

This commit is contained in:
yuri
2015-08-17 11:22:06 +03:00
parent d1dea478f7
commit d360cbcb4b
2 changed files with 5 additions and 5 deletions

View File

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

View File

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