-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds an option to delete the user's account to the profile page. Fixes #536. Co-authored-by: Bastian Greshake Tzovaras <[email protected]>
- Loading branch information
1 parent
8d891a4
commit 496cc0e
Showing
10 changed files
with
381 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{% extends 'main/application.html' %} | ||
|
||
{% block title %}AutSPACEs - {{title}} {% endblock %} | ||
|
||
{% load static %} | ||
{% load custom_tags %} | ||
{% load humanize %} | ||
|
||
{% block content %} | ||
|
||
<!-- Delete User Profile Form --> | ||
<section id="delete-user-profile-form"> | ||
<div class="container profile-section"> | ||
<h3><label>Delete AutSPACEs account</label></h3> | ||
<p/><a href="https://www.openhumans.org/">OpenHumans</a> ID: {{ oh_id }} | ||
|
||
<p/>Are you sure you want to delete your AutSPACEs account? | ||
<p/>This will remove all your data from the AutSPACEs platform. This process cannot be undone. | ||
<p/>Select the switch below to also remove your stories from OpenHumans. | ||
<form action="{% url 'users:delete' %}" class="form-context" method="post"> | ||
{% csrf_token %} | ||
<div class="form-group"> | ||
{% for field in form %} | ||
<div class="row"> | ||
<div class="form-check col-lg-12"> | ||
<div class="custom-control custom-switch"> | ||
{{ field }} | ||
<label class="custom-control-label" for="{{ field.auto_id}}">{{ field.label }}</label> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
<div class="form-group"> | ||
<button type="submit" class="btn btn-primary" id="submitForm">Delete account</button> | ||
<a role="button" class="btn btn-secondary ml-5" id="cancelForm" href="{% url 'users:profile' %}">Cancel</a> | ||
</div> | ||
</form> | ||
</div> | ||
</section> | ||
|
||
{% endblock %} | ||
|
||
|
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,31 @@ | ||
{% extends 'main/application.html' %} | ||
|
||
{% block title %}AutSPACEs - {{title}} {% endblock %} | ||
|
||
{% load static %} | ||
{% load custom_tags %} | ||
{% load humanize %} | ||
|
||
{% block content %} | ||
|
||
<!-- User Profile Deleted Page --> | ||
<section id="goodbye-notification"> | ||
<div class="container profile-section"> | ||
<h3><label>Thank you for contributing to AutSPACEs</label></h3> | ||
|
||
<p/>We're sorry to see you go, but are grateful for your contribution to AutSPACEs. | ||
{% if delete_oh_data %} | ||
<p/>All of your personal data has been removed from the AutSPACEs platform and your stories have been removed from <a href="https://www.openhumans.org/">OpenHumans</a>. This won't affect any other data you may have stored on the OpenHumans platform. | ||
{% else %} | ||
<p/>All of your personal data has been removed from the AutSPACEs platform, but please be aware that stories you entered here may still be stored on <a href="https://www.openhumans.org/">OpenHumans</a>. You'll need to delete these separately. | ||
{% endif %} | ||
<p/>If you'd like to contribute to AutSPACEs again in the future, please feel free to create a new account. | ||
<div class="form-group"> | ||
<a role="button" class="btn btn-primary" id="return" href="{% url 'index' %}">Return to front page</a> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
{% endblock %} | ||
|
||
|
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,92 @@ | ||
interactions: | ||
- request: | ||
body: project_member_id=39896706&all_files=True | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '41' | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
User-Agent: | ||
- python-requests/2.31.0 | ||
method: POST | ||
uri: https://www.openhumans.org/api/direct-sharing/project/files/delete/ | ||
response: | ||
body: | ||
string: '{"ids":[69072773]}' | ||
headers: | ||
Allow: | ||
- POST, OPTIONS | ||
Cache-Control: | ||
- max-age=0, no-cache, no-store, must-revalidate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '18' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 28 Jul 2023 15:06:45 GMT | ||
Expires: | ||
- Fri, 28 Jul 2023 15:06:45 GMT | ||
Server: | ||
- gunicorn/20.0.4 | ||
Vary: | ||
- Accept, Authorization, Cookie, Origin | ||
Via: | ||
- 1.1 vegur | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
User-Agent: | ||
- python-requests/2.31.0 | ||
method: POST | ||
uri: https://www.openhumans.org/api/direct-sharing/project/remove-members/ | ||
response: | ||
body: | ||
string: '"success"' | ||
headers: | ||
Allow: | ||
- POST, OPTIONS | ||
Cache-Control: | ||
- max-age=0, no-cache, no-store, must-revalidate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '9' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 28 Jul 2023 15:06:46 GMT | ||
Expires: | ||
- Fri, 28 Jul 2023 15:06:46 GMT | ||
Server: | ||
- gunicorn/20.0.4 | ||
Vary: | ||
- Accept, Authorization, Cookie, Origin | ||
Via: | ||
- 1.1 vegur | ||
X-Frame-Options: | ||
- SAMEORIGIN | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
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
Oops, something went wrong.