Skip to content
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

Delete a user #937

Open
marien-probesys opened this issue Jan 27, 2025 · 0 comments
Open

Delete a user #937

marien-probesys opened this issue Jan 27, 2025 · 0 comments
Labels
ready ✅ You can work on this!
Milestone

Comments

@marien-probesys
Copy link
Member

marien-probesys commented Jan 27, 2025

Problem

Users may leave their structure and their corresponding data should either be deleted or anonymized.

Solution

Allow administrators to delete a user account. This solution deletes all the data related to the user (e.g. tickets, messages, entity events, etc.) Thus, the administrator must be warned about the risks.

Specifications

Form

Add a form at the bottom of the user edit page, allowing to delete the user.

There must be a warning to indicate that all the information, including tickets, messages and traceability related to this user will be deleted.

Clicking on the submit button must ask for confirmation.

Associations constraints

There are good chances that a lot of Entity associations will prevent the deletion because of the foreign keys' constraints.

Deletions must be applied in cascade at the database level, e.g.:

#[ORM\JoinColumn(nullable: false, onDelete: "CASCADE")]
private ?User $createdBy = null;

Some other user associations doesn't require the association to be set, so we can set the value to null:

#[ORM\JoinColumn(onDelete: "SET NULL")]
private ?User $assignee = null;

You can find all the relations with git grep 'private ?User'

Estimated time

1 - 2 days

@marien-probesys marien-probesys added this to the Version 0.15 milestone Jan 27, 2025
@marien-probesys marien-probesys added the ready ✅ You can work on this! label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ✅ You can work on this!
Projects
None yet
Development

No branches or pull requests

1 participant