mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-16 17:47:40 +08:00
Security patch
This commit is contained in:
parent
7bd373ffc6
commit
337e8e15e1
@ -47,9 +47,8 @@ namespace Orchard.Roles.Services {
|
||||
|
||||
for (var adjustmentLimiter = 0; adjustmentLimiter != 3; ++adjustmentLimiter) {
|
||||
if (!context.Granted && context.User != null) {
|
||||
if (String.Equals(context.User.UserName, "Administrator", StringComparison.OrdinalIgnoreCase) ||
|
||||
((!String.IsNullOrEmpty(CurrentSite.SuperUser) &&
|
||||
String.Equals(context.User.UserName, CurrentSite.SuperUser, StringComparison.OrdinalIgnoreCase)))) {
|
||||
if (!String.IsNullOrEmpty(CurrentSite.SuperUser) &&
|
||||
String.Equals(context.User.UserName, CurrentSite.SuperUser, StringComparison.OrdinalIgnoreCase)) {
|
||||
context.Granted = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user