mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-19 04:45:07 +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) {
|
for (var adjustmentLimiter = 0; adjustmentLimiter != 3; ++adjustmentLimiter) {
|
||||||
if (!context.Granted && context.User != null) {
|
if (!context.Granted && context.User != null) {
|
||||||
if (String.Equals(context.User.UserName, "Administrator", StringComparison.OrdinalIgnoreCase) ||
|
if (!String.IsNullOrEmpty(CurrentSite.SuperUser) &&
|
||||||
((!String.IsNullOrEmpty(CurrentSite.SuperUser) &&
|
String.Equals(context.User.UserName, CurrentSite.SuperUser, StringComparison.OrdinalIgnoreCase)) {
|
||||||
String.Equals(context.User.UserName, CurrentSite.SuperUser, StringComparison.OrdinalIgnoreCase)))) {
|
|
||||||
context.Granted = true;
|
context.Granted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user