Commit 1eb6e67f authored by Valentin Samir's avatar Valentin Samir
Browse files

[wiki/auth] Pas d'inscription hors zone crans

parent 534927e4
......@@ -12,6 +12,7 @@ import urlparse
from netaddr import IPNetwork, IPAddress
from MoinMoin.auth import BaseAuth
from MoinMoin.Page import Page
from MoinMoin import user
from anonymous_user import AnonymousAuth
......@@ -35,7 +36,7 @@ class IpRange(AnonymousAuth):
def request(self, request, user_obj, **kw):
user_obj, cont = AnonymousAuth.request(self, request, user_obj, **kw)
if user_obj and not user_obj.valid:
if not user_obj or not user_obj.valid:
# Are we trying to do a protected action (eg newaccount)
action = request.args.get("action", "")
if action in self.actions:
......@@ -44,8 +45,7 @@ class IpRange(AnonymousAuth):
p = urlparse.urlparse(request.url)
url = urlparse.urlunparse(('https', p.netloc, p.path, "", "", ""))
return user_obj, True
return user_obj, False
return user_obj, True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment