Different kinds of users

Hi,
i have read many of articles in this forum, but nothing has helped me. So what’s problem: I am preparing app in which I need to have different roles of users. First kind of users, we can call them “Architect”, is the one who can create projects and see all their own projects - thats no problem. Second type of user is “Supervisor”. Supervisor could see all projects of Architects who belong to particular Supervisor. And third kind of user is “Admin”. Admin can create logins for each kind of users. This is no problem as well. Each user has field which determines kind of user - Admin, Architect, Supervisor.

But problem is, that i am not able to set up repeating group with list of project so that supervisors could see only projects of Architects who belong to them. Architects and Supervisors have mutual fields which can be paired, in this case it is Supervisors email. I assumed that it could be possible to sort projects of Architects based on the supervisor emails field.

My idea of sorting logic was:
Display Projects to repeating group if Project Creators “Supervisor Email” = current usser email.

Has anyone idea how to solve this problem?

The way to do that sort of relationship in Bubble is to create a field called “Owner” on the User, and give it a type of User - so we are relating one User to another.

So when the Admin sets up an Architect, then select who the Owner is.

Then you can do something like … Show me all the Project’s when the Creator’s Owner is the Current User.

Slightly more complex, but ultimately faster and easier to display, is to have a field on User called “Supervises” and have this as type User and tick the “this field is a list” box.

Then when the Admin creates the Architect, you add the new thing to the select Supervisor’s Supervises list.

You can then just do Current User’s Supervises Projects or something like that.