diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Controllers/AdminController.cs b/src/OrchardCore.Modules/OrchardCore.Roles/Controllers/AdminController.cs index 3d28a912373..6b28253bc78 100644 --- a/src/OrchardCore.Modules/OrchardCore.Roles/Controllers/AdminController.cs +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Controllers/AdminController.cs @@ -216,10 +216,8 @@ public async Task EditPost(string id, string roleDescription) rolesDocument.PermissionGroups.TryAdd(role.RoleName, new List()); - var permissionNames = _permissionProviders.SelectMany(x => x.GetDefaultStereotypes()) - .SelectMany(y => y.Permissions ?? Enumerable.Empty()) - .Select(x => x.Name) - .ToList(); + var installedPermissions = await GetInstalledPermissionsAsync(); + var permissionNames = installedPermissions.SelectMany(x => x.Value).Select(x=>x.Name); // Save var rolePermissions = new List();