This repository was archived by the owner on May 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
User Role #42
Copy link
Copy link
Open
Description
Is your feature request related to a problem? Please describe.
A user should be able to have different roles(Admin, Candidate, ContestManager, ...etc). Right now there is no way to assign a role to the user.
Describe the solution you'd like
- Create a separate model as
Role. - Role will only have one field
valuewhich is of type enum(There will also beid. Butcreated_atandupdated_atfields are not necessary). This enum should have two entries for now -CandidateandAdmin. - A user should be able to have many roles.
- Make sure that user will have a
Candidaterole when the user registers throughapi/registerroute. - Add a separate api to add a role to the user (
POST /api/users/:id/roles). - Add a separate api to remove a role from the user. (
DELETE /api/users/:id/roles/:role_id)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels