Open Closed

Multi Tenant Modules #4101


User avatar
0
cjsmith87 created
  • ABP Framework version: Latest
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated: no

I am currently on trial, setting up a new project and I have a few questions on some things that aren't available out of the box (I don't think!):

  1. We have different types of "Tenant" that will have different data and different UI etc. Tenant data will be stored in a separate database to the main abp data. Some tenants will have their own dedicated dbs and some will share with other tenants (of the same type). Is this the best approach to add additional dbcontexts for each tenant type? I essentially want multiple separate "Applications/Products" within the same solution so that abp.io can manage the Tenants and Users centrally for all the "apps". Could something like this be achieved using modules?
  2. Some users, not all, will need to access multiple tenants. The user account should only exists once (so one password etc) but if a users has permissions over multiple tenants, they should be able to switch tenant once logged in. What would be the best approach to provide this functionality? I dont want to mess up updates for abp.io commercial so Ideally I want it to sit on top of this, maybe as a module?

1 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer
    1. We have different types of "Tenant" that will have different data and different UI etc. Tenant data will be stored in a separate database to the main abp data. Some tenants will have their own dedicated dbs and some will share with other tenants (of the same type). Is this the best approach to add additional dbcontexts for each tenant type? I essentially want multiple separate "Applications/Products" within the same solution so that abp.io can manage the Tenants and Users centrally for all the "apps". Could something like this be achieved using modules?

    Yes, you can set different connection strings for different tenants that will allow using different databases for the tenants of your choosing.

    1. Some users, not all, will need to access multiple tenants. The user account should only exists once (so one password etc) but if a users has permissions over multiple tenants, they should be able to switch tenant once logged in. What would be the best approach to provide this functionality? I dont want to mess up updates for abp.io commercial so Ideally I want it to sit on top of this, maybe as a module?

    No, a user can not be a member of multiple tenants. You will need to create the same user in for all the tenants.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11