Hi all,
I want to develop an app where we have an “organisation”, and this organisation has “users”.
So a user could be created, but it must be assigned to an organisation.
For example, imagine this is a… real estate website (it is not).
You would have a company, maybe called “Rip Off Real Estate Co” and they would have many users logging in. Sales agents, receptionist, managers, etc. But, they would all fall under the umbrella of the main company / organisation.
Currently, all the tutorials I see, are about having a single user auth, that gets access to the site. But, I need to somehow tie each user to that organisation only.
Then, once tied, if they tried to see another organisation’s data, they could not.
So for example, if a user from https://real_estate_shonky.com/Rip_Off_Real_Estate_Co/
tried to view data from https://real_estate_shonky.com/expensive_houses_in_your_area/
they would be rejected.
I imagine you would ‘create a new organisation’, and this would come with a default ‘user’. The Admin user for that organisation.
But, how do you then create new ones that can only interact with that organisation?
I hope that all made sense. Thanks so much.