Added ability for registrars to edit their own accounts

Also small fixes to role based access
This commit is contained in:
Pinga 2024-02-26 11:49:05 +02:00
parent 9af773eb37
commit 97343361cc
8 changed files with 946 additions and 14 deletions

View file

@ -11,6 +11,10 @@ class UsersController extends Controller
{
public function listUsers(Request $request, Response $response)
{
if ($_SESSION["auth_roles"] != 0) {
return $response->withHeader('Location', '/dashboard')->withStatus(302);
}
$userModel = new User($this->container->get('db'));
$users = $userModel->getAllUsers();
return view($response,'admin/users/listUsers.twig', compact('users'));