If the user is an admin, they should have access to the admin panel. The admin panel should display a list of all users registered in the system. The list of users can be fetched from the GET /api/v1/users endpoint. This endpoint is not paginated, so all the registered users will be returned all at one.
The admin should be able to remove any user from the system, with the exception of currently logged-in admin for obvious reasons. A user can be removed by calling the DELETE /api/v1/users/{userId} endpoint.
Definition of Done:
[x] Render a list/table of users registered in the system in the admin panel. Display the user's email and whether or not they are an admin.
[x] For each user in the list, apart from the logged-in admin, it should be possible to delete them form the system, probably in the form of a button with a confirmation dialog box.
[x] If the user is not an admin, an appropriate message should be displayed, along with a "Return to Home" button when the user attempts to access the admin panel.
If the user is an admin, they should have access to the admin panel. The admin panel should display a list of all users registered in the system. The list of users can be fetched from the
GET /api/v1/users
endpoint. This endpoint is not paginated, so all the registered users will be returned all at one.The admin should be able to remove any user from the system, with the exception of currently logged-in admin for obvious reasons. A user can be removed by calling the
DELETE /api/v1/users/{userId}
endpoint.Definition of Done: