Hi adalo experts pls we need help
we are facing an issue. We would like to build an app that uses some kind of “sharing”. So users can manage multiple database objects with different type of permissions. I’ll give an example.
There is Joe who is owner of Company A and employee of Company B. Then there is Dave who is owner of Company B.
Let’s say we have database collection called “Companies”. Usually (in normal database) there would be table with these rows (very simple):
ID, company name
1, Company A,
2, Company B
ID, user name
Then there would be table Company_data:
ID, Company_ID, user_id, permissions
1, 1, 1, owner
2, 2, 1, employee
3, 2, 2, owner
There also table events:
ID, event name, company_id, date
1, Dinner at Hotel, 2, 27-12-2021 21:45
Now we don’t know how to build that. Second issue is that user can only see 1 company at a time AND can / cannot edit data based on permissions (which owner can change).