Look at the attached graphic.
I'm trying to keep this as simple as possible.
Basically I want to have multiple admins(or superusers) who own regular users who own sites.
- Admins can give regular users permission or role to a website.
- Admins can see and edit all sites of the users they own.
- Users can only see & edit their own sites. (based on the role).
- One site can be managed by multiple users.
I don't know if I should have
permissions table with multiple rows for each role so one user can have many rows for each role or maybe use an array in one row only... Idk. I'm stuck there.
What's the best way to do this simply?
P.S: I know the graphic has User2 under site1 and site2 but I don't need it that complex. Same users for same site but different roles is sufficient. No need for 1 regular user to edit 2 sites.