Change MemberModelMapper GetMemberGroupValue to return member groups ordered alphabetically.

- This is used in ContentPropertyDisplay class - for UI purposes only.
This commit is contained in:
Thomas Poulsen
2019-05-22 14:13:46 +01:00
parent 89c376f77a
commit 50c2d574f1

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