Skip to content

Multi Tenancy

Binod edited this page Mar 22, 2019 · 7 revisions

Different Companies/Sites/Users share different level of roles for giving different layer of permissions. And those roles are as follows:

  1. Super Admin
  2. Admin
  3. Manager
  4. User
  5. Guest

Architecture
Fig (1): Multi-Tenant Architecture

We can view the architecture from two different angle:

A. Company & B. User


A. Company

Company wise, we categories three level of companies.

1. Super Admin

  • Super Admin is us at Nube iO

2. Admin

  • Admin is the Nube iO client (Vendor)
  • Associates on Super Admin company

3. Manager

  • Manager is our client’s client
  • Associates on Admin company

B. User

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 Admin user is the user which is associated with Super Admin company and has role Super Admin
  • User with role Super Admin has all read/write/delete for its child descendants on the hierarchy and can read/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 Admin has all read/write/delete for its child descendants on the hierarchy and can read/write(partial) own values

3. Manager

  • Associates with Admin company and the user has role Manager
  • User with role Manager has all read/write/delete for its child descendants on the hierarchy and can read/write(partial) own values

4. User

  • Associates with Manager company and the user has role User
  • Limited on read/write(partial) own values

5. Guest

  • Associates with Manager company and the user has role Guest
  • 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:

  1. company
  2. site
  3. user
  4. user_group
Clone this wiki locally