Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.
This repository was archived by the owner on May 27, 2021. It is now read-only.

User Role #42

Open
Open
@pbteja1998

Description

@pbteja1998

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 value which is of type enum(There will also be id. But created_at and updated_at fields are not necessary). This enum should have two entries for now - Candidate and Admin.
  • A user should be able to have many roles.
  • Make sure that user will have a Candidate role when the user registers through api/register route.
  • 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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions