Base solution for your next web application
Open Closed

Q: Login As Host #3120


User avatar
0
tteoh created

Dear Support,

Reference-> <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Mvc-Angularjs#multi-tenancy">https://www.aspnetzero.com/Documents/De ... ti-tenancy</a> It states Multi-tenancy can be disabled to become a single tenant application. Therefore, hiding away all multi-tenancy related functionalities. However, there will be still be a signle tenant created named "Default".

Reference-> <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Mvc-Angularjs#login">https://www.aspnetzero.com/Documents/De ... arjs#login</a> With single tenancy, the input for Tenancy Name will be hidden away. The login is always using "Default" tenancy.

:idea: Questions:

  1. With single tenancy, is still important to configure any setting (AbpSettings) at Host level?
  2. If yes, how to login as Host admin? Part of database initialisation, two Admin user accounts were created, one without TenantId (Host) and the other TenantId = 1 (Default)

:!: Clarifications: I would like to clarify when configuring AspNet Zero setting (AbpSettings), how the settings are classified as host-relevant or tenant-relevant.

For example, i realise the SMTP configuration is saved at host level in AbpSettings table with TenantId = NULL whereas TIMING is saved witn TenantId = 1.

:idea: Assumptions: Am i right to assume that for single tenant implemenation, Admin login to Default tenant is as equivalent of Login as Host to perform host-relevant settings.

Regards, /Tommy


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I will try to answer your questions as follow:

    1. With single tenancy, is still important to configure any setting (AbpSettings) at Host level? No, because when you disable multi tenancy, all settings will be retrieved for default tenant.

    2. If yes, how to login as Host admin? Part of database initialisation, two Admin user accounts were created, one without TenantId (Host) and the other TenantId = 1 (Default) In AspNet Zero, there are some parts whcih we couldn't make %100 single tenant when you disable multi tenancy. Migrations are one of them and maybe the only place. When you disable multi tenancy, as you said an host admin user is created and it is useless in single tenant mode but you cannot login as host admin to system and you don't have to.

    For Clarifications: We think some settings as host level and some others are tenant level. But as I remember TimeZone setting should be host level, see <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/Timing/TimingSettingProvider.cs">https://github.com/aspnetboilerplate/as ... rovider.cs</a>.

    Even if a setting is host level, it should be configurable in tenant settings when you disable multi tenancy. If it is not, then there might be a bug.

    You can read this document in order to get more informatin about ABP's setting system <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Setting-Management">https://aspnetboilerplate.com/Pages/Doc ... Management</a>. If you have specific questions, we can answer them as well.

    For Assumptions: Exactly, it should work like that including some other settings like "Allow users to register to the system." under User Management tab. Since it is not allowed to register host users to system, host settings page does not contain this setting but tenant settings page does.

    Thanks.

  • User Avatar
    0
    tteoh created

    Hi Support,

    Gratitude for the confirmation and you just checked out one of my task list for today.

    Thank you so much! /tommy