From 3a0ee7de94c24ec68d7ff76d4d4228419da1a7bb Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 11 May 2021 11:49:55 +0300 Subject: [PATCH] fix --- application/Espo/Controllers/EntityManager.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/application/Espo/Controllers/EntityManager.php b/application/Espo/Controllers/EntityManager.php index bc67e40ade..b49497e3c5 100644 --- a/application/Espo/Controllers/EntityManager.php +++ b/application/Espo/Controllers/EntityManager.php @@ -69,12 +69,9 @@ class EntityManager $this->entityManagerTool = $entityManagerTool; $this->configWriter = $configWriter; - $this->checkControllerAccess(); - } - - protected function checkAccess(): bool - { - return $this->user->isAdmin(); + if (!$this->user->isAdmin()) { + throw new Forbidden(); + } } public function postActionCreateEntity(Request $request)