Base solution for your next web application
Open Closed

Turn off features for single tenant #1649


User avatar
0
joe704la created

Is there a way to turn off and on certain features for the single tenant? For example be able to toggle on off the entire chat feature?


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

    Hi,

    This is possible. Login to system as a host user (leave tenancy name empty on login screen). Go to Tenants page, Click Actions -> Features for a tenant and turn onn/off a feature on that dialog for a specific tenant.

  • User Avatar
    0
    joe704la created

    Will this work for Single tenant mode? I didn't realize you can login as host user for a single tenant mode.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Sorry, I misunderstand your question. If you disable multiTenancy, you can either do it in Seed method or from database.

  • User Avatar
    0
    joe704la created

    What do you mean by Seed method?

    Just through the Database should work. Thank you

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    If you have a single tenant (it's the "Default" tenant), just delete "ChatFeature" related rows in the AbpFeatures table in the database, then the Default tenant can not see chat. This is the only way for existing database.

    These rows are added in database seed (here: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.EntityFramework/Migrations/Seed/Host/DefaultEditionCreator.cs#L38">https://github.com/aspnetzero/aspnet-ze ... tor.cs#L38</a>). So, you can delete these 3 rows if you don't want to add chat features to the default tenant when you create a new database and run "update-database"

  • User Avatar
    0
    joe704la created

    Perfect thank you. I did figure out to create a second Edition named Professional and then I gave the Chat feature the ID for that Edition and that worked as well. That way when we are ready to incorporate the Chat feature back it will be super easy to do so.

    Again thank you