In my application, there will be Users (“Admin”) who can create their roadmap, and other users (“Customers”, the admin’s customers) can login and participate to the roadmap.
In my dashboard, I would like to display a “community” tab and in this tab display only the Customers who are linked to the User (Admin).
How can I differentiate between these two types of users? Especially when the list of Customers appears in the User Admin, because at the moment I can only display all Customers but not ONLY those who are linked to the User( Admin).
Where is the customer/admin link recorded? It should probably be in the User table (assuming each user can only have one admin, but even if not: it can be done there). You can create a field “Admin” there that records a user’s admin.
So the login flow for customer and admin is and should be the same (username & email).
Once logged in, the status (admin or customer) should be recognised from the database side and then accordingly, different elements will be displayed. Correct?
If so, then you can have for example conditionals on different groups that check the status of the user and then display/don’t display certain information.
Yes everything works when i used Admin = Yes/No but i have a group where i want to display the customers (Admin = No) for the login user (Admin = Yes), and i can’t link a list of customers (Admin = No)…