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.
Create a data type called ‘team’ then have on the user data type a field called ‘team’ that is related to the ‘team’ data type. Create an option set called ‘role’ then on the user data type have a field that is ‘role’ and is related to the option set. Then in your privacy rules setup a rule that references the users role as well as conditional expressions on any elements that trigger workflows to restrict access to functions based on the users role.
Thanks for stepping in. You mean to say that instead of creating multiple data fields for each option set value (user_roles), you suggest to use one single data field and control each ones access via privacy/workflow/data type methods.
But simply it works and I have worked with it in the past, but as here are multiple user types, and multiple teams (parent team & sub-team) makes it confusing.
Yes, complex things can be confusing at times. I often like to use paper and pen to help map things out when the complexity of the task makes it not possible for me to just map it out in my head. Sometimes that visualization on paper helps make it seem a little simpler.