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)