Secure Delete Account Feature#428
Merged
drkae456 merged 9 commits intoHardhat-Enterprises:mainfrom Sep 22, 2025
Merged
Conversation
Contributor
Author
|
Closed previous PR and opened a new one. All conflicts checked and migration files deleted. |
Introduced three choices for users when they want to delete their accounts. They receive an email notification upon each request.
9918b3d to
9b687bd
Compare
040b117 to
0297ab2
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Student Name: Ann Mugure Githiomi
Task Description: Secure Account Deletion
This PR relates to securing the account delete feature where users are given three options to securely delete their accounts. Upon selection of each option, they receive an email notification.
These options include;
Temporarily delete the account.
Delete the account immediately.
Deactivate the account and the account becomes automatically deleted after 30 days.
For security and validation, before selecting any option, the user must input their password. A clear error message appears when a password is invalid or empty. Furthermore, email notifications and Django messages are used to record every activity. In this task, I handled the choice a user selects and password verification using Django forms and views. I also utilized UserDeletionRequest model to store scheduled deletions and audit information. A management command was also introduced to automate deletion. The emails that notify users about actions was completed by utilizing Django's send_mail function.




