Fix logic & make code easier to follow

This commit is contained in:
Sebastiaan Janssen
2019-06-25 11:41:33 +02:00
committed by GitHub
parent 71d076aba2
commit 1da2c00f0a

View File

@@ -104,8 +104,9 @@ namespace Umbraco.Web.Services
}
}
if (hasAccess || denyRules.Length == 0)
return true;
// No need to check denyRules if there aren't any, just return current state
if (denyRules.Length == 0)
return hasAccess;
// check if this item has any deny arguments, if so check if the user is in one of the denied user groups, if so they will
// be denied to see it no matter what