Hello guys,
I am thinking about creating Tabidoo app for our clients. We have several companies accessing the app and in each company we have multiple users. I need to set roles for several tables to allow clients to access (see) only their records (their means - were created by anyone from client’s company). I do not want to have special role for each client, it should be more generic. Let’s say a role named Client.
What is recommended approach to set this?
Thanks Tehek
Hi Tehek,
You need to link the table Users with companies. So you can assign a user to a company.
In case you want to filter records in a table, the table must be linked to the company table as well.
So your table has a link to Company and user has a link to company.
Then, in role, you go to Tables permission, select the table, select the option
Use fixed Javascript where for loading table data
The condition can look like this
(Company is the link property in both tables - user and invoices e. g.
Company has a unique property name)
doo.model.<[Company (company)]>.value.name === doo.currentUser.<[Company (company)]>.value.name
In case you have any problem with that, contact us at support@tabidoo.cloud and we can help you with the settings.
Regards
Michal