views:

26

answers:

0

Hi,

We have many accounts and an account can have many stores and now I have users. A user could potentially belong to either an account or a store. Like below

model

I just feel like this is insanity and was hoping for some guidance in the matter. These are my requirements.

A user belonging to an account should have access to all the stores but a user belonging to a store should have access only to that store.

I was thinking of solving this with some sort of roles but can't figure out how to yet. How are others doing it?