Fixed and closed #433 : fixed IP-filter.
This commit is contained in:
parent
1a10addd2b
commit
1c1331e69d
2 changed files with 9 additions and 5 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
|||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("3.0.2.526")]
|
||||
[assembly: AssemblyFileVersion("3.0.2.526")]
|
||||
[assembly: AssemblyVersion("3.0.2.527")]
|
||||
[assembly: AssemblyFileVersion("3.0.2.527")]
|
||||
|
|
|
@ -801,7 +801,11 @@ namespace ScrewTurn.Wiki {
|
|||
}
|
||||
if(canEditWithApproval && canEdit) canEditWithApproval = false;
|
||||
|
||||
if(canEdit && !string.IsNullOrEmpty(Settings.IpHostFilter))
|
||||
bool isAdminstrator = false;
|
||||
foreach(string group in groups) {
|
||||
if(group == Settings.AdministratorsGroup) isAdminstrator = true;
|
||||
}
|
||||
if(canEdit && !string.IsNullOrEmpty(Settings.IpHostFilter) && !isAdminstrator)
|
||||
canEdit = VerifyIpHostFilter();
|
||||
}
|
||||
|
||||
|
@ -835,9 +839,9 @@ namespace ScrewTurn.Wiki {
|
|||
// If we match, then the user is in the filter, return false.
|
||||
var regex = new Regex(regExpression, options);
|
||||
if(regex.IsMatch(hostAddress))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return true; // Made it here, then all is well, return true.
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue