Fixed stupid issue of usermanager for hash creating not being one that is selected from settings.
parent
aab5b5536b
commit
29a3c02cfa
|
@ -49,13 +49,19 @@ class UserManager(object):
|
|||
class HackerspaceUserManager(UserManager):
|
||||
"""A user manager for the Warsaw Hackerspace, uses interal apis."""
|
||||
def __init__(self):
|
||||
super(HackerspaceUserManager, self).__init__(self)
|
||||
super(HackerspaceUserManager, self).__init__()
|
||||
self.group = settings().get(["accessControl", "group"])
|
||||
|
||||
def createPasswordHash(self, password):
|
||||
return password
|
||||
|
||||
def findUser(self, username=None):
|
||||
if username == "dummy":
|
||||
return DummyUser()
|
||||
print "finduser: {}".format(username)
|
||||
if requests.get("https://capacifier.hackerspace.pl/{}/{}".format(self.group, username)).status_code == 200:
|
||||
return HackerspaceUser(username)
|
||||
else
|
||||
else:
|
||||
return None
|
||||
|
||||
##~~ FilebasedUserManager, takes available users from users.yaml file
|
||||
|
@ -245,7 +251,7 @@ class HackerspaceUser(User):
|
|||
"login": self._username,
|
||||
"password": password,
|
||||
}
|
||||
return requests.post("https://auth.hackerspace.pl/", data).status_code == 200
|
||||
return requests.post("https://auth.hackerspace.pl/", data, verify=False).status_code == 200
|
||||
|
||||
|
||||
##~~ DummyUser object to use when accessControl is disabled
|
||||
|
|
Loading…
Reference in New Issue