Open pbteja1998 opened 4 years ago
@pbteja1998 is this open to work on?
Yes.
@debamitra Shall I assign it to you?
@pbteja1998 yes.
Open a WIP draft PR while developing.
As per my understanding, OpenRank will be used by companies in-house. In that case, there should be 3 roles.
@pbteja1998 @nitinrgoyal Have raised a Draft PR for this issue, please provide some feedback on what needs to change.
Are we also writing some tests?
Make sure that user will have a Candidate role when the user registers through api/register route. - this one is still pending
It's good to have tests written for this project. I guess we should mandate to write tests for anything that is added so that it won't break anything existing in the future. I suggest to go with Mocha or Jest. Any thoughts @pbteja1998 @nitinrgoyal
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
Role
.value
which is of type enum(There will also beid
. Butcreated_at
andupdated_at
fields are not necessary). This enum should have two entries for now -Candidate
andAdmin
.Candidate
role when the user registers throughapi/register
route.POST /api/users/:id/roles
).DELETE /api/users/:id/roles/:role_id
)