mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge branch 'refs/heads/1.10.x' into 1.10.2
This commit is contained in:
commit
358c57464e
@ -90,10 +90,6 @@ namespace Orchard.Roles.Services {
|
|||||||
roleRecord.Name = roleName;
|
roleRecord.Name = roleName;
|
||||||
roleRecord.RolesPermissions.Clear();
|
roleRecord.RolesPermissions.Clear();
|
||||||
|
|
||||||
if (!String.Equals(currentRoleName, roleName)) {
|
|
||||||
_roleEventHandlers.Renamed(new RoleRenamedContext {Role = roleRecord, NewRoleName = roleName, PreviousRoleName = currentRoleName});
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var rolePermission in rolePermissions) {
|
foreach (var rolePermission in rolePermissions) {
|
||||||
string permission = rolePermission;
|
string permission = rolePermission;
|
||||||
if (_permissionRepository.Get(x => x.Name == permission) == null) {
|
if (_permissionRepository.Get(x => x.Name == permission) == null) {
|
||||||
@ -116,6 +112,10 @@ namespace Orchard.Roles.Services {
|
|||||||
foreach(var permission in currentPermissions.Values)
|
foreach(var permission in currentPermissions.Values)
|
||||||
_roleEventHandlers.PermissionRemoved(new PermissionRemovedContext { Role = roleRecord, Permission = permission.Permission });
|
_roleEventHandlers.PermissionRemoved(new PermissionRemovedContext { Role = roleRecord, Permission = permission.Permission });
|
||||||
|
|
||||||
|
if (!String.Equals(currentRoleName, roleName)) {
|
||||||
|
_roleEventHandlers.Renamed(new RoleRenamedContext {Role = roleRecord, NewRoleName = roleName, PreviousRoleName = currentRoleName});
|
||||||
|
}
|
||||||
|
|
||||||
TriggerSignal();
|
TriggerSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user