mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Saving a couple cycles to avoid recalculating known results in the grantingNames array.
--HG-- branch : dev
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Orchard.Roles.Services {
|
||||
if (!context.Granted) {
|
||||
|
||||
// determine which set of permissions would satisfy the access check
|
||||
var grantingNames = PermissionNames(context.Permission, Enumerable.Empty<string>()).ToArray();
|
||||
var grantingNames = PermissionNames(context.Permission, Enumerable.Empty<string>()).Distinct().ToArray();
|
||||
|
||||
// determine what set of roles should be examined by the access check
|
||||
IEnumerable<string> rolesToExamine;
|
||||
|
Reference in New Issue
Block a user