mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
[Fixes #5745]
This commit is contained in:
parent
5eef9c654c
commit
a200e35923
@ -90,10 +90,6 @@ namespace Orchard.Roles.Services {
|
||||
roleRecord.Name = roleName;
|
||||
roleRecord.RolesPermissions.Clear();
|
||||
|
||||
if (!String.Equals(currentRoleName, roleName)) {
|
||||
_roleEventHandlers.Renamed(new RoleRenamedContext {Role = roleRecord, NewRoleName = roleName, PreviousRoleName = currentRoleName});
|
||||
}
|
||||
|
||||
foreach (var rolePermission in rolePermissions) {
|
||||
string permission = rolePermission;
|
||||
if (_permissionRepository.Get(x => x.Name == permission) == null) {
|
||||
@ -116,6 +112,10 @@ namespace Orchard.Roles.Services {
|
||||
foreach(var permission in currentPermissions.Values)
|
||||
_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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user