-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We would need a role column in our User table.
role can be an Enum with the following options: "STUDENT", "TEACHER", "ADMIN"
By default, let's set the 3 of us to "ADMIN"/"SUPERADMIN" and then every other user who signs up gets "GUEST"/"STUDENT" role by default.
Now when I call the function isAdminUser(), the function checks the database for the currently logged in user's role, and returns true / false if he's "ADMIN".
Metadata
Metadata
Assignees
Labels
✨ featureNew featureNew feature