-
Notifications
You must be signed in to change notification settings - Fork 68
Fix/remove user/soft removal #1724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c6da84c
Set is_active to False when deleting a user
OhMaley f1d2978
change the email sending method and populate the missing txt files
OhMaley 84b0f4d
add a checkbox to show/hide deleted users in the list of participant …
OhMaley 71022ba
Merge pull request #1718 from OhMaley/fix/remove-user/soft-removal
ObadaS a847d42
Fixed the wrong user being named in the greetings in the email sent t…
224d0ff
Flake8 fixed
626b10e
restricted the usage of deletion link more than one time, used a diff…
ihsaan-ullah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,24 @@ | ||
| {% extends 'emails/base_email.html' %} | ||
|
|
||
| {% block content %} | ||
| <p>We have received your request to delete your account.</p> | ||
| <p>To proceed with the deletion of your account, please confirm your request by clicking the link below:</p> | ||
| <p><a href="{{ protocol }}://{{ domain }}{% url 'accounts:delete' uidb64=uid token=token %}">{{ protocol }}://{{ domain }}{% url 'accounts:delete' uidb64=uid token=token %}</a></p> | ||
|
|
||
| <br> | ||
|
|
||
| <p><strong>Important Information:</strong></p> | ||
| <ul> | ||
| <li>Once confirmed, all your personal data will be permanently deleted or anonymized, except for competitions and submissions retained under our user agreement.</li> | ||
| <li>After deletion, you will no longer be eligible for any cash prizes in ongoing or future competitions.</li> | ||
| <li>If you wish to delete any submissions, please do so before confirming your account deletion.</li> | ||
| </ul> | ||
|
|
||
| <br> | ||
|
|
||
| <p>If you did not request this action or have changed your mind, you can safely ignore this email, and your account will remain intact.</p> | ||
|
|
||
| <br> | ||
|
|
||
| <p>Thank you for being part of our community.</p> | ||
| {% endblock %} |
7 changes: 7 additions & 0 deletions
7
src/templates/profiles/emails/template_delete_account_confirmed.txt
This file contains hidden or 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,7 @@ | ||
| {% extends 'emails/base_email.html' %} | ||
|
|
||
| {% block content %} | ||
| <p>Your account has been successfully removed. Thank you for being part of our community.</p> | ||
| <br> | ||
| <p>If you change your mind, you can create a new account at any time. We'd be happy to welcome you back!</p> | ||
| {% endblock %} |
This file contains hidden or 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
118 changes: 118 additions & 0 deletions
118
src/templates/profiles/emails/template_delete_account_notice.txt
This file contains hidden or 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,118 @@ | ||
| {% extends 'emails/base_email.html' %} | ||
|
|
||
| {% block content %} | ||
| <h2>User account deletion notice</h2> | ||
|
|
||
| <p>You are receiving this notice because your are an administrator of the platform.</p> | ||
|
|
||
| <br> | ||
|
|
||
| <p>The following user has removed their account:</p> | ||
| <ul> | ||
| <li><strong>id:</strong> {{ deleted_user.id }}</li> | ||
| <li><strong>username:</strong> {{ deleted_user.username }}</li> | ||
| <li><strong>email:</strong> {{ deleted_user.email }}</li> | ||
| </ul> | ||
|
|
||
| <br> | ||
|
|
||
| <h3>Summary</h3> | ||
|
|
||
| <ul> | ||
| <li>Organizations: {{ organizations|length }}</li> | ||
| <li>Competitions owner: {{ competitions_organizer|length }} </li> | ||
| <li>Competitions participation: {{ competitions_participation|length }}</li> | ||
| <li>Submissions: {{ submissions|length }}</li> | ||
| <li>Data: {{ data|length }}</li> | ||
| <li>DataGroups: {{ data_groups|length }}</li> | ||
| <li>Tasks: {{ tasks|length }}</li> | ||
| <li>Queues: {{ queues|length }}</li> | ||
| <li>Posts: {{ posts|length }}</li> | ||
| </ul> | ||
|
|
||
| <h3>Details</h3> | ||
|
|
||
| <h4>Organizations the user is part of:</h4> | ||
| <ul> | ||
| {% for organization in organizations.all %} | ||
| <li> | ||
| <a class="item" href="{% url 'profiles:organization_profile' pk=organization.id %}"> | ||
| {{ organization }} | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Competitions the user is the owner:</h4> | ||
| <ul> | ||
| {% for competition in competitions_organizer.all %} | ||
| <li> | ||
| <a class="item" href="{% url 'competitions:detail' pk=competition.pk %}"> | ||
| {{ competition }} | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Competitions the user participated in:</h4> | ||
| <ul> | ||
| {% for competition in competitions_participation.all %} | ||
| <li> | ||
| <a class="item" href="{% url 'competitions:detail' pk=competition.pk %}"> | ||
| {{ competition }} | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Submissions from the user:</h4> | ||
| <ul> | ||
| {% for submission in submissions.all %} | ||
| <li> | ||
| {{ submission }} | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Data created by the user</h4> | ||
| <ul> | ||
| {% for d in data.all %} | ||
| <li> | ||
| {{ d }} | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>DataGroups created by the user</h4> | ||
| <ul> | ||
| {% for data_group in data_groups.all %} | ||
| <li>{{ data_group }}</li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Tasks created by the user</h4> | ||
| <ul> | ||
| {% for task in tasks.all %} | ||
| <li> | ||
| <a class="item" href="{% url 'tasks:detail' pk=task.pk %}"> | ||
| {{ task }} | ||
| </a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Queues created by the user</h4> | ||
| <ul> | ||
| {% for queue in queues.all %} | ||
| <li>{{ queue }}</li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| <h4>Posts posted by the user</h4> | ||
| <ul> | ||
| {% for post in posts.all %} | ||
| <li>{{ post }}</li> | ||
| {% endfor %} | ||
| </ul> | ||
|
|
||
| {% endblock %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.