mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge pull request #6125 from neTp9c/issue/6107
[Fixes #6107] Fixing content permissions part
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
@@ -120,6 +120,11 @@ namespace Orchard.ContentPermissions.Drivers {
|
||||
|
||||
protected override DriverResult Editor(ContentPermissionsPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
||||
// ensure the current user is allowed to define permissions
|
||||
if (!_authorizer.Authorize(Permissions.GrantPermission)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var allRoles = _roleService.GetRoles().Select(x => x.Name).OrderBy(x => x).ToList();
|
||||
|
||||
var model = new ContentPermissionsPartViewModel();
|
||||
@@ -224,4 +229,4 @@ namespace Orchard.ContentPermissions.Drivers {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user