controllers refactoring

This commit is contained in:
Yuri Kuznetsov
2021-04-29 15:33:23 +03:00
parent bf320261f9
commit 805f377459
39 changed files with 916 additions and 709 deletions

View File

@@ -72,11 +72,9 @@ class EntityManager
$this->checkControllerAccess();
}
protected function checkControllerAccess()
protected function checkAccess(): bool
{
if (!$this->user->isAdmin()) {
throw new Forbidden();
}
return $this->user->isAdmin();
}
public function postActionCreateEntity(Request $request)