-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
db8bf2b
commit 955de3c
Showing
12 changed files
with
55 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -589,7 +589,7 @@ def test_login_email_error(client, mocker): | |
def test_login_email_hijacked(client, user, admin_user): | ||
"""Test that a 403 response is returned for email login view if user is hijacked""" | ||
client.force_login(admin_user) | ||
client.post(f"/hijack/{user.id}/") | ||
client.post("/hijack/acquire/", {"user_pk": user.id}) | ||
response = client.post( | ||
reverse("psa-login-email"), | ||
{"flow": SocialAuthState.FLOW_LOGIN, "email": "[email protected]"}, | ||
|
@@ -600,7 +600,7 @@ def test_login_email_hijacked(client, user, admin_user): | |
def test_register_email_hijacked(client, user, admin_user): | ||
"""Test that a 403 response is returned for email register view if user is hijacked""" | ||
client.force_login(admin_user) | ||
client.post(f"/hijack/{user.id}/") | ||
client.post("/hijack/acquire/", {"user_pk": user.id}) | ||
response = client.post( | ||
reverse("psa-register-email"), | ||
{"flow": SocialAuthState.FLOW_LOGIN, "email": "[email protected]"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- hijack/notification.html --> | ||
|
||
{% load static %} | ||
{% if request.user.is_hijacked %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'hijack/hijack.min.css' %}" media="screen"> | ||
<div class="djhj" id="djhj"> | ||
<div class="djhj-notification"> | ||
<div class="djhj-message"> | ||
You are currently working on behalf of <em>{{ request.user.username }}</em>. | ||
</div> | ||
<form action="{% url 'hijack:release' %}" method="POST" class="djhj-actions"> | ||
{% csrf_token %} | ||
<input type="hidden" name="next" value="{{ hijack_logout_redirect_url }}"> | ||
<button class="djhj-button" type="submit"> | ||
release | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters