I reviewed the authentication and authorization documentation once again and didn't find a solution for multiple member levels per user.
Let's assume I have a project management app where I need to assign members to various projects. How would you give them access to view and edit each project?
Since a member table can have only one trongate_user_id which relates to the trongate_users table and that can have only one user_level_id, I don't see how that would work.
Has anyone implemented anything like this and/or do you have a suggestion on the best way to do this?
What is the best practice for multiple member levels per user?
4 years ago
4 years ago
#1
4 years ago
#2
Let's assume I have a project management app where I need to assign members to various projects. How would you give them access to view and edit each project?
Get the members module from the Module Market
Projects -- you can have a projects table that would hold all your projects, project_id, project_title
Members -- member table. In the member table, have at least member_id, first_name, last_name, project_id, member_level.
Member_level table -- such as manager, front_end_manager, back_end_manager, programmer.
Use a members table for this below:
Since a member table can have only one trongate_user_id which relates to the trongate_users table and that can have only one user_level_id, I don't see how that would work.
Trongate_user_levels should be used for admin of the site and everyone else. Use a Members table for project users. This separates the site from the projects. Helps with security.
Dan
Get the members module from the Module Market
Projects -- you can have a projects table that would hold all your projects, project_id, project_title
Members -- member table. In the member table, have at least member_id, first_name, last_name, project_id, member_level.
Member_level table -- such as manager, front_end_manager, back_end_manager, programmer.
Use a members table for this below:
Since a member table can have only one trongate_user_id which relates to the trongate_users table and that can have only one user_level_id, I don't see how that would work.
Trongate_user_levels should be used for admin of the site and everyone else. Use a Members table for project users. This separates the site from the projects. Helps with security.
Dan
4 years ago
#3
Thanks Dan!
Yes, I can see how that would work.
Then I can add a method to check for the member_level right after _make_sure_allowed('member');
Jim
Yes, I can see how that would work.
Then I can add a method to check for the member_level right after _make_sure_allowed('member');
Jim
4 years ago
#4
Jim,
Yes that way you have trongate user levels for access.
And Member user levels for projects.
Dan
Yes that way you have trongate user levels for access.
And Member user levels for projects.
Dan