Starts in:
2 DAYS
16 HRS
18 MIN
15 SEC
Starts in:
2 D
16 H
18 M
15 S
Open Closed

Tenant Creation #2987


User avatar
0
darutter created

I'm using version 5.2 commercial creating a Blazor server app.

I have a situation in my app where a tenant needs to create a new tenant. I tried to use the TenantAppService to create it but it fails because of lack of permissions. I can't add the permission to the tenant that needs to create the other tenant because it doesn't show up as an option in the permissions list.

Can you tell me how I can accomplish this?

The reason I need this ability is I'm creating an app where a company (distributor) has a line of products that they sell to specific dealers and that relationship needs to be created by the distributor. The reason the dealer has to be created as a tenant is that the dealer will need to log into the app as a tenant with their own set of users and products, but have access to the products of the distributor.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can change the permission scope in your PermissionDefinitionProvider

    For example:

    var group = context.GetGroup(SaasHostPermissions.GroupName);
    group.MultiTenancySide = MultiTenancySides.Both;
    var createPermission = group.GetPermissionOrNull(SaasHostPermissions.Tenants.Create);
    createPermission.MultiTenancySide = MultiTenancySides.Both;
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06