Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
a4904919
Commit
a4904919
authored
Dec 18, 2017
by
David Seaward
Browse files
soft launch fixes:
* use Services enum in profile view * fix jwt_status typo
parent
9bef4e62
Changes
2
Hide whitespace changes
Inline
Side-by-side
limitmonitor/views.py
View file @
a4904919
...
...
@@ -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
...
...
purist/custom.py
View file @
a4904919
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment