express-mongo-jwt-boilerplate
express-mongo-jwt-boilerplate copied to clipboard
[Discussion] Introducing a powerful role management system
Currently we don't have a role management system. We have admin and user. But that's not it.
While developing applications its often to have multiple roles and allow access based on roles. Roles does inherit properties like an admin can do what an editor can do for sure but not otherway around.
It would be better if we could introduce a nice role management system where users can add roles and manage roles
I think it's not a good idea to have everyone - editors, admins, users etc in one collection. They may have totally different fields in schema.
Maybe we should have collection of roles
Yeah. That's true. They have different attributes. But we can keep the role in the same user collection and we can create a separate collection to hold role attributes.