mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 02:44:52 +08:00
Fixing an issue with cached permissions, work item: 17057
If a role was saved with no permissions at all, the inmemory cache of role's permission isn't cleared because the trigger was outside of the loop. --HG-- branch : 1.x
This commit is contained in:
@@ -84,8 +84,8 @@ namespace Orchard.Roles.Services {
|
|||||||
}
|
}
|
||||||
PermissionRecord permissionRecord = _permissionRepository.Get(x => x.Name == permission);
|
PermissionRecord permissionRecord = _permissionRepository.Get(x => x.Name == permission);
|
||||||
roleRecord.RolesPermissions.Add(new RolesPermissionsRecord { Permission = permissionRecord, Role = roleRecord });
|
roleRecord.RolesPermissions.Add(new RolesPermissionsRecord { Permission = permissionRecord, Role = roleRecord });
|
||||||
TriggerSignal();
|
|
||||||
}
|
}
|
||||||
|
TriggerSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetFeatureName(string permissionName) {
|
private string GetFeatureName(string permissionName) {
|
||||||
|
Reference in New Issue
Block a user