Commit a4904919 authored by David Seaward's avatar David Seaward

soft launch fixes:

* use Services enum in profile view
* fix jwt_status typo
parent 9bef4e62
......@@ -15,7 +15,8 @@ def userlimit(request):
has_limit = {}
none_limit = True
for limit in limits:
has_limit[limit.service] = limit.is_active
label = limit.service_label().upper()
has_limit[label] = limit.is_active
if limit.is_active:
none_limit = False
......
......@@ -40,7 +40,7 @@ class AuthenticationBackend(BaseBackend):
if jwt_status == 200 and jwt_token is not None:
is_valid = True
elif jwt_code == 403 and jwt_code in known_codes:
elif jwt_status == 403 and jwt_code in known_codes:
# recognised authentication failure
is_valid = False
else:
......@@ -75,6 +75,7 @@ class AuthenticationBackend(BaseBackend):
if self.is_valid_jwt(normalized_username, password):
user = user_model(username=username, email=None)
user.email = user.get_identity()
user.set_password(password)
user.save()
......
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