Open Closed

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


User avatar
0
mahsundag created

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:
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team 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";
            //...
        }
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 09, 2026, 11:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.