Fixed Roles export handler.

This commit is contained in:
Sipke Schoorstra
2015-07-15 14:52:49 +01:00
parent bcd3eb1e2e
commit 25e7d6db87

View File

@@ -35,7 +35,7 @@ namespace Orchard.Roles.ImportExport {
var root = new XElement("Roles");
context.Document.Element("Orchard").Add(root);
foreach (var role in roles.OrderBy(x => x)) {
foreach (var role in roles.OrderBy(x => x.Name)) {
root.Add(new XElement("Role",
new XAttribute("Name", role.Name),
new XAttribute("Permissions", string.Join(",", role.RolesPermissions.Select(rolePermission => rolePermission.Permission.Name)))));