xceed-nitj / AMS-with-TimeTable

http://nitjtt.netlify.app/
9 stars 22 forks source link

Adding roles to existing user #631

Closed harimurugan1989 closed 2 weeks ago

harimurugan1989 commented 2 weeks ago

In the addreviewer controller in event.js

Currently, the email is checked for the existing user and if the user is not there, new user object is being created and the role of "PRM" is added

However, if the user is already existing, we again need to check if the PRM role is already there in the role array. If not there, we need to add it.

This is because the user might be using some other modules and user id exist. When he comes to this module for this first time, we need to assign the user with the role.