- 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)
-
0
hi
Can you share the steps and code to repro your problem?
-
0
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
-
0
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); } }
-
0
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.
-
0
hi
You can create a new project then check the code of
XXXDbMigrationService