user check

This commit is contained in:
Yuri Kuznetsov
2024-10-17 17:04:52 +03:00
parent 5d144f0063
commit 33e977b796
@@ -140,6 +140,10 @@ class PostUsers implements Action
if (!$this->acl->checkEntityRead($user)) {
throw new Forbidden("No access to user.");
}
if (!$user->isRegular() && !$user->isAdmin()) {
throw new Forbidden("Only regular and admin users allowed.");
}
}
return $users;