Merge pull request #5508 from Geckex/v7/temp-5507

MemberModelMapper to return member groups ordered alphabetically
This commit is contained in:
Sebastiaan Janssen
2019-05-30 17:38:53 +02:00
committed by GitHub

View File

@@ -178,6 +178,7 @@ namespace Umbraco.Web.Models.Mapping
var result = Roles.GetAllRoles().Distinct()
// if a role starts with __umbracoRole we won't show it as it's an internal role used for public access
.Where(x => x.StartsWith(Constants.Conventions.Member.InternalRolePrefix) == false)
.OrderBy(x => x, StringComparer.OrdinalIgnoreCase)
.ToDictionary(x => x, x => false);
// if user has no roles, just return the dictionary