So I am trying to create a heavily watered down version of Discord for learning purposes and I want to implement the permission system where admins can create roles and give them permissions from a checklist. What will be the best way of doing this?The current way I am thinking is that I will have another mongoose Model called Role which will have all the permissions mentioned as boolean fields and every user will have a field called role that will reference this model and check against it whenever they want to perform any action. Is there any better way of doing this?
Submitted September 05, 2018 at 07:10AM by lostPoncho
No comments:
Post a Comment