Aperto Chiuso

After the tenants are added it is requested that no tenants be added #7215


User avatar
0
mahsundag creato

Hello,

After the tenants are added, it is requested that no tenants be added. There is a TenantId field in all my tables except application-specific common definition tables. When the application starts to be used, predetermined tenants are automatically added and no tenants can be added later. How can I manage this?

Thanks in advance.

  • ABP Framework version: v8.0.4
  • UI Type: Blazor Server
  • Database System: EF Core (PostgreSQL)
    • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

1 risposte
  • User Avatar
    0
    maliming creato
    Team di supporto Fullstack Developer

    hi

    When the application starts to be used, predetermined tenants are automatically added

    You can add an IDataSeedContributor to add the predetermined tenants.

    https://docs.abp.io/en/abp/latest/Data-Seeding

    no tenants can be added later.

    To prevent this, you can disable the SaasHostPermissions permissions. This means no one can call the API to create new tenants.

    https://docs.abp.io/api-docs/commercial/8.0/api/Volo.Saas.Host.SaasHostPermissions.Tenants.html

    public static class SaasHostPermissions
    {
        public const string GroupName = "Saas";
    
        public static class Tenants
        {
            public const string Default = GroupName + ".Tenants";
            public const string Create = Default + ".Create";
            public const string Update = Default + ".Update";
            public const string Delete = Default + ".Delete";
            //...
        }
    }
    
Made with ❤️ on ABP v8.2.0-preview Updated on marzo 25, 2024, 15:11