Ends in:
2 DAYS
16 HRS
55 MIN
11 SEC
Ends in:
2 D
16 H
55 M
11 S
Open Closed

New permission not granted to tenant admin users #1244


User avatar
0
safak.bal created
  • ABP Framework version: v4.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Steps to reproduce the issue:

After defining new permission, the permission is granted to the host admin user. Bu t i have 3 tenants and the permission is not granted to these tenant's admin users. When these permissions are granted and why new permission definition is not granted to the tenant admins too.


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the steps and code to repro your problem?

  • User Avatar
    0
    safak.bal created

    Permission Definition: queryManagement.AddChild(QueryPermissions.QueryManagement_ExportImport, LocalizationHelper.L("Permission:QueryManagement:ExportImport"));

    follow this steps:

    • Add one or more tenants
    • Add the permission definition
    • Run DBMigrator
    • Check the AbpPermissionGrants table and see only the Null TenantId is added and no tenant admin row is added

    But i tested this; after adding the permission , if you add the tenant after the permission definition then everyting works fine

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the source code of your XXXDbMigrationService ?

    It should contain such code like below.

    foreach (var tenant in tenants)
    {
        using (_currentTenant.Change(tenant.Id))
        {
            await SeedDataAsync(tenant);
        }
    }
    
  • User Avatar
    0
    safak.bal created

    In which document this is explained? i cannot see. Our migrationservice is still in fthe form of the first version. We need to change there like your example.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can create a new project then check the code of XXXDbMigrationService

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35