Hi NocoBase Community,
I’m working on a project for a small pharmacy business and need guidance on the best way to bind users to specific locations, especially when users can be assigned to more than one site.
Scenario:
• Example users: Alice and Bob
• Alice is assigned to both Location A and Location B
• Bob is assigned ONLY to Location B
• I want both to see/edit/manage data (inventory, orders, etc.) only from their assigned locations
What I’ve Tried So Far:
• Set up “Users” and “Locations” collections
• Looked into using a many-to-many relationship field between Users and Locations
• Explored Departments plugin for location-based grouping
Questions:
1. Is the many-to-many relationship field the best way to do this?
2. Should I use Departments, or both relationship fields and Departments?
3. How would I restrict data views and permissions so Alice and Bob only see the data for their assigned locations?
4. Any workflow or automation tips for easier assignment and permission management as my business grows?
Would really appreciate any detailed steps, screenshots, or links to guides that can help set this up correctly while avoiding common pitfalls. Thanks in advance!
Do you want one user to see data from two pharmacies, and another user to see data from one pharmacy?
Please refer to:
Thanks for the reply. I presume this is the commercial plugin? i can’t see the listing on the plugins when testing out the alpha.
To expand the scenario a bit further, please could you help me understand whether there is some sort of space hierarchy? Let’s say Alice is now promoted to CEO of company 1. She needs to have access to locations A, B and C. Do I have to manually assign her to location C or is there a way to have a parent space that can see multiple locations without manually assigning?
The reason I ask is I am considering whether to use Nocobase commercially and market to other pharmacies. I want to have one app but allow each subscribed user to access data relating to their organisation and locations.