I’m trying to implement a multi-user system with multi-level user access with different roles.
For example, think of it like Canva, when you create an account you are default selected as “admin” of your team functionality. You can later make a “name” for your team, and add users to the team, I want to go a level further, all the people part of the team will each have their “sub-teams/department” and they can add new people to the sub-team and assign tasks based on user roles. The super admin(s) of the team can see all of the things happening down his team and sub-teams and more.
I tried a few different methods, but at some given point I’m getting confused for probably missing something out. I tried db setups in this manner:
Option sets: User_roles = X (1st level user), Y (2nd level user), Z (3rd level user)
**Data Type: **
- User (mostly as default): User Roles= User_roles (option_sets)
- Team: Team Name, Member list, Sub Teams
- Sub Teams: Name, Members list
- Task: Task title, task details, Assigned to = Users
When using option sets as a list data field type, individual option set types can’t be selected thus making it more confusing, so I used two Data fields specifying two different option set values.
What am I doing wrong? A short guide might help