Skip to content

Conversation

@jevinjojo
Copy link

@jevinjojo jevinjojo commented Nov 12, 2025

Issue

Screenshot 2025-11-12 175316

Changes Made

  • Commented out entire "Account deletion" section in user_profile.html
  • Disabled /me/delete route in cfp/urls.py to prevent API access
  • Added documentation comment to DeleteAccountView explaining the issue
  • Added TODO comments referencing future Account Settings implementation

Summary by Sourcery

Temporarily remove the "Delete My Account" option from the speaker profile page and disable its endpoint until a full, GDPR-compliant account deletion feature is implemented.

Enhancements:

  • Hide the account deletion section in the speaker profile template

Documentation:

  • Add TODO comments in templates, URL configs, and DeleteAccountView explaining incomplete deletion logic and future Account Settings implementation

Chores:

  • Disable the delete account route in the CFP urls and event URL configurations

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 12, 2025

Reviewer's Guide

Temporarily disables the “Delete My Account” feature by removing its UI, disabling related routes and URL mappings, and annotating the incomplete deletion logic with TODOs for a future comprehensive implementation.

Class diagram for updated DeleteAccountView and related URL mapping

classDiagram
    class EventUrls {
        +reset
        +submit
        +user
        #user_delete (disabled)
        +user_submissions
        +user_mails
        +schedule
    }
    class DeleteAccountView {
        +post(request, event)
        #TODO: Only calls user.deactivate(), does not fully delete user data
    }
    EventUrls <|-- DeleteAccountView
Loading

File-Level Changes

Change Details Files
Removed account deletion UI from speaker profile template
  • Wrapped the entire Account deletion section in HTML comments
  • Inserted TODO comments referencing upcoming Account Settings overhaul
app/eventyay/cfp/templates/cfp/event/user_profile.html
Disabled the delete account route in the CFP URL configuration
  • Commented out the “me/delete” path entry
  • Added a TODO explaining the need to rebuild deletion under Account Settings
app/eventyay/cfp/urls.py
Commented out internal user_delete URL in EventUrls
  • Disabled the user_delete attribute in EventUrls
  • Added a TODO noting the endpoint is incomplete and will be restored later
app/eventyay/base/models/event.py
Documented incomplete deletion logic in DeleteAccountView
  • Added TODO comments above DeleteAccountView explaining it only deactivates users
  • Referenced need for full data cleanup implementation
app/eventyay/cfp/views/user.py

Assessment against linked issues

Issue Objective Addressed Explanation
#1234 Remove or comment out the 'Delete My Account' option from the Speaker Profile page UI and related view logic.
#1234 Do not delete the underlying code—only disable the feature for now to preserve reference code.
#1234 Add a TODO comment referencing this issue for future implementation in the centralized Account Settings section.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The broad indentation reformat in user_profile.html adds a lot of noise—please restrict changes to only the deletion section to keep the diff focused.
  • Instead of commenting out the delete-account code, consider removing it entirely (you can always restore via version control) to keep templates and URL configs clean.
  • Rather than hard‐commenting the delete route, you might introduce a feature flag or conditional setting to disable account deletion until the GDPR-compliant implementation is ready.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The broad indentation reformat in user_profile.html adds a lot of noise—please restrict changes to only the deletion section to keep the diff focused.
- Instead of commenting out the delete-account code, consider removing it entirely (you can always restore via version control) to keep templates and URL configs clean.
- Rather than hard‐commenting the delete route, you might introduce a feature flag or conditional setting to disable account deletion until the GDPR-compliant implementation is ready.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jevinjojo
Copy link
Author

@mariobehling please take a look when you're free. Thanks!

@mariobehling
Copy link
Member

@jevinjojo Please follow the suggestion of @sourcery-ai about

The broad indentation reformat in user_profile.html adds a lot of noise—please restrict changes to only the deletion section to keep the diff focused.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR temporarily removes the "Delete My Account" functionality from the speaker profile page until a proper GDPR-compliant account deletion implementation can be developed. The feature is gated behind a feature flag (ENABLE_ACCOUNT_DELETION) that defaults to False.

Key changes:

  • Added ENABLE_ACCOUNT_DELETION feature flag in settings (defaults to False)
  • Conditionally registered the /me/delete route based on feature flag
  • Removed account deletion UI section from the user profile template
  • Commented out user_delete URL property in Event model

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/eventyay/config/settings.py Introduces ENABLE_ACCOUNT_DELETION feature flag with default False to control account deletion feature availability
app/eventyay/cfp/views/user.py Adds documentation to DeleteAccountView explaining it's disabled by default and requires GDPR-compliant implementation
app/eventyay/cfp/urls.py Conditionally registers the delete account route only when feature flag is enabled
app/eventyay/cfp/templates/cfp/event/user_profile.html Removes entire account deletion section from the speaker profile UI
app/eventyay/base/models/event.py Comments out user_delete URL property with TODO note about incomplete implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 427 to 428
TODO: Current implementation only calls user.deactivate() and does not fully remove user data and
is not GDPR compliant and will need a complete rework with proper data cleanup, once Account settings feature implemented.
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation has a grammatical error. The phrase "and does not fully remove user data and is not GDPR compliant" is redundant. It should be either "does not fully remove user data" or "is not GDPR compliant", or better yet: "does not fully remove user data (not GDPR compliant)".

Suggested change
TODO: Current implementation only calls user.deactivate() and does not fully remove user data and
is not GDPR compliant and will need a complete rework with proper data cleanup, once Account settings feature implemented.
TODO: Current implementation only calls user.deactivate() and does not fully remove user data (not GDPR compliant).
A complete rework with proper data cleanup will be needed once the Account settings feature is implemented.

Copilot uses AI. Check for mistakes.
submit = '{base}submit/'
user = '{base}me/'
user_delete = '{base}me/delete'
# TODO: Disabled user_delete URL — delete endpoint is incomplete/broken.
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an extra space in the TODO comment. "TODO: Disabled" should be "TODO: Disabled" (single space after colon).

Suggested change
# TODO: Disabled user_delete URL — delete endpoint is incomplete/broken.
# TODO: Disabled user_delete URL — delete endpoint is incomplete/broken.

Copilot uses AI. Check for mistakes.
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see AI reviews.

@jevinjojo
Copy link
Author

@mariobehling I think we're good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove “Delete My Account” Option from Speaker Profile Section

2 participants