open discussion: RBAC structure for multi-tenant app
hi, im a junior dev working on a multi tenant app. this isnt a help request, just trying to clear some confusion in my head.
i got:
- user entity
- business entity
- store entity
each user can have many-to-many with both business and store.
each store belongs to one business.
now im building RBAC and not sure how to handle it.
should each user have many stores and businesses like:
or go with one assignment model like:
im still learning so maybe im overcomplicating it, but i’d like to know what makes more sense.
also in the second approch i keep ending up fetching by ids then fetching the stores or businesses again, feels messy.
3 Replies
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into
#ask-ai if you get antsy for a second opinion!Have you considered an approach like this?