Open Closed

SaaS module doesn't seed correctly when connection string isn't provided while creating tenant #5049


User avatar
0
seyda created
  • ABP Framework version: v7.0.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: No exception, wrong behavior
  • Steps to reproduce the issue:
  • Create a new tenant without providing connection string in SaaS module with an admin email: admin@mycompany.com. Tenant database won't be created since connection string is empty.
  • Set connection string with "Database Connection Strings" in actions menu. Tenant database will be created. In tenant database, in AbpUsers table, "admin@abp.io" is seeded instead of "admin@mycompany.com" that I've provided while creating tenant.
  • Apply database migrations with "Apply Database Migrations" in actions menu. Tenant database will be created. In tenant database, in AbpUsers table, "admin@abp.io" is seeded instead of "admin@mycompany.com" that I've provided while creating tenant.

admin@mycompany.com is NOT persisted on host database so admin email and password information is missing when tenant database is created. In the end host and tenant databases hold different information of same user.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will find a way to resolve this. Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can store the password of the admin user to a tenant. and get and use it on Task HandleEventAsync(TenantConnectionStringUpdatedEto eventData) and Task HandleEventAsync(ApplyDatabaseMigrationsEto eventData)

    I do not recommend storing the source password of a user.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11