express-mongo-jwt-boilerplate icon indicating copy to clipboard operation
express-mongo-jwt-boilerplate copied to clipboard

[Discussion] Introducing a powerful role management system

Open kasvith opened this issue 5 years ago • 3 comments

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

kasvith avatar Jul 06 '19 16:07 kasvith

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.

d0peCode avatar Jul 06 '19 17:07 d0peCode

Maybe we should have collection of roles

d0peCode avatar Jul 06 '19 17:07 d0peCode

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.

kasvith avatar Jul 06 '19 17:07 kasvith