Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create admin dashboard page for users management #34

Open
GabrielMajeri opened this issue Feb 10, 2024 · 0 comments
Open

Create admin dashboard page for users management #34

GabrielMajeri opened this issue Feb 10, 2024 · 0 comments
Assignees
Labels
admin-interface Issues related to the admin interface front-end Issue relating to UI/UX

Comments

@GabrielMajeri
Copy link
Member

GabrielMajeri commented Feb 10, 2024

We should create a page in the admin interface (for example, at the /admin/users path) to allow for the viewing, creation, editing and removal of users (with roles).

This page will only list the users which have an administrative role assigned to them (i.e. we will not store or display the anonymous users who use the app without logging in). Therefore, we can expect this page to only have a handful of users. That being said, it's still a good idea to use TanStack Query to load and cache them (it also has support for server-side rendering).

The page will consist of a list/table showing all of the users (possibly implemented using TanStack Table), with the following columns:

  • ID
  • Name
  • E-mail
  • Role
  • Actions (edit/delete)

Since we do not store the user's name or e-mail in the database, we can retrieve them dynamically by using a batch request to the Microsoft Graph API. Check out this tutorial on how to use the Microsoft Graph SDK to fetch data in React.

We should also have an "add user" button which will allow us to allocate roles to new users. This could be a separate page (for example, /admin/users/new) on which you can search for an user in the Microsoft 365 tenant by their name/e-mail, select them and give them a role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin-interface Issues related to the admin interface front-end Issue relating to UI/UX
Projects
None yet
Development

No branches or pull requests

2 participants