Fixed and closed #433 : fixed IP-filter.

This commit is contained in:
Matteo Tomasini 2010-03-31 15:40:57 +00:00
parent 1a10addd2b
commit 1c1331e69d
2 changed files with 9 additions and 5 deletions

View file

@ -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")]

View file

@ -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>