COPS-IITBHU / hackalog-backend

https://cops-hackalog.herokuapp.com/
5 stars 19 forks source link

Add support for cops member specific user profiles. #42

Open m-e-l-u-h-a-n opened 3 years ago

m-e-l-u-h-a-n commented 3 years ago

COPS members will have a special profiles. So probably for now this can be done by a simple is_cops_member(boolean field) and cops_group(character field with choices as 1. SDG 2. CPG 3. IG 4. INFOSEC). Any adminstrative powers if required can be added later on based on discussion.

sahilsaini1107 commented 3 years ago

Hi, i am sahil saini and i am interested in working on this

m-e-l-u-h-a-n commented 3 years ago

Sure you may go ahead and ask any doubts in the discord channel or here.

Vanshika-kejriwal commented 3 years ago

I am Vanshika and iam interested to work on this issue

king-11 commented 3 years ago

Hey @Vanshika-kejriwal as far as I am aware for now your tasks should be:

If there are any updates on how we want to handle this issue it will be informed to you by @shubhanshu02 or @m-e-l-u-h-a-n

Regarding group names there has been a change we should have choices for roles as:

shubhanshu02 commented 3 years ago

Hi @Vanshika-kejriwal! Great to see your interest in this issue. As @king-11 already mentioned the tasks, here are some more details about the fields.

The boolean field is_cops_member has a default value False and cops_group is a character field which we can fill from the given four choices similar to the linked code snippet below. If we make this field nullable, then cops_group will be set null/None for the case when the user is not a COPS member. Else we'll need to add another choice, 'None', to the given options. I guess the prior one will be better.

https://github.com/COPS-IITBHU/hackalog-backend/blob/6c9417a9a5f820e5ead605e6ce53decf79c0a343/authentication/models.py#L6-L12

If you have some ideas to add or face any problems, feel free to discuss them here.

@king-11 @m-e-l-u-h-a-n any suggestions/corrections?