Jici
2
Let’s say you have three DB
A) User (have one field that point to company, let’s call it “active company”. Also add another field that point to company that is a list of company the user is linked to)
B) Company
C) Job
When user create an account, you should ask if he register for a company or not. If not, you will create a company and just give it the user name as company name.
When user log in, if Current user:company linked to:count >1 Go to company selector page, if not, go directly to dashboard but before, assign the current user active company to the Current user company linked to:first item. On the select page, when the user select the company, make change to current user active company with the selected item > go to dashboard
Now, when item are created, you should always set a “company” field. In privacy rules, set Current’s user active company is This data’s company