From 059ca7146da0c4ab46ecf2e080415a19a5e702dc Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 8 Feb 2024 15:37:41 +0800 Subject: [PATCH] Let the Manage Role permission as a sub-permission of Edit. Resolve #18935 --- .../Volo/Abp/Identity/IdentityPermissionDefinitionProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissionDefinitionProvider.cs b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissionDefinitionProvider.cs index c7ae8c39a8b..3e7c558a836 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissionDefinitionProvider.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityPermissionDefinitionProvider.cs @@ -18,10 +18,10 @@ public override void Define(IPermissionDefinitionContext context) var usersPermission = identityGroup.AddPermission(IdentityPermissions.Users.Default, L("Permission:UserManagement")); usersPermission.AddChild(IdentityPermissions.Users.Create, L("Permission:Create")); - usersPermission.AddChild(IdentityPermissions.Users.Update, L("Permission:Edit")); + var editPermission = usersPermission.AddChild(IdentityPermissions.Users.Update, L("Permission:Edit")); + editPermission.AddChild(IdentityPermissions.Users.ManageRoles, L("Permission:ManageRoles")); usersPermission.AddChild(IdentityPermissions.Users.Delete, L("Permission:Delete")); usersPermission.AddChild(IdentityPermissions.Users.ManagePermissions, L("Permission:ChangePermissions")); - usersPermission.AddChild(IdentityPermissions.Users.ManageRoles, L("Permission:ManageRoles")); identityGroup .AddPermission(IdentityPermissions.UserLookup.Default, L("Permission:UserLookup"))