krishna m
krishna m

Reputation: 73

Manage User Roles based on Projects in rails and mongoid

I am using rails and MongoId. I have 3 models - User, Project and Role. I want to manage user roles based on projects. For example: user1 has assigned to 2 projects, for project1 user1 may be admin, for project2 user1 may be a Quality Analyst.

How I can achieve this when using mongoid in rails.

Thanks in Advance.

Upvotes: 0

Views: 162

Answers (1)

uday
uday

Reputation: 1481

You can use rolify and add multiple roles to user and in Project model filter if a user has a specified role and manage it.

Upvotes: 1

Related Questions