-
Notifications
You must be signed in to change notification settings - Fork 1
Multi Tenancy
Different Companies/Sites/Users share different level of roles for giving different layer of permissions. And those roles are as follows:
- Super Admin
- Admin
- Manager
- User
- Guest
Fig (1): Multi-Tenant Architecture
We can view the architecture from two different angle:
A. Company & B. User
Company wise, we categories three level of companies.
1. Super Admin
-
Super Adminis us at Nube iO
2. Admin
-
Adminis the Nube iO client (Vendor) - Associates on
Super Admincompany
3. Manager
-
Manageris our client’s client - Associates on
Admincompany
User wise, we categories five (we can say four, User and Guest can view as on same level) level of user.
1. Super Admin
-
Super Adminuser is the user which is associated withSuper Admincompany and has roleSuper Admin - User with role
Super Adminhas allread/write/deletefor its child descendants on the hierarchy and canread/write(partial)own values.
Note: Write partial means, user has different attributes like first_name, last_name, role, it's associated_company etc. and user can change values like first_name, last_name but not the role, associated_company. Those some values will remain as is like before on the update.
2. Admin
- Associates with it's respective company having role
Admin - User with role
Adminhas allread/write/deletefor its child descendants on the hierarchy and canread/write(partial)own values
3. Manager
- Associates with
Admincompany and the user has roleManager - User with role
Managerhas allread/write/deletefor its child descendants on the hierarchy and canread/write(partial)own values
4. User
- Associates with
Managercompany and the user has roleUser - Limited on
read/write(partial)own values
5. Guest
- Associates with
Managercompany and the user has roleGuest - Limited on
read/write(partial)own values
Guest and User don't have much difference. Only certain things like editing Widget, saving different Layouts on front-end will be restricted to the Guest.
To achieve that requirements we have following schemas:
- company
- site
- user
- user_group