Adding an option to also delete mentions of a user when deleting. #8975

Open
opened 2025-11-02 08:24:37 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @CptPie on GitHub (May 19, 2022).

Feature Description

The basic idea behind this feature proposal is the following scenario:

A developer with the handle @bob is leaving a project managed with Gitea and therefore deletes his account (or the administrator does so).
I noticed that while all author references to bob get set to the ghost user, direct mentions via @bob in comments of other users stay persistent.
I think it would be a good idea to add an option to the user deletion prompt to also delete mentions of that user (and setting these mentions to the ghost user).

To this extend i did some work on a proof of concept implementation located here: https://github.com/cptpie/gitea/tree/empri-devops . I am fully aware that this fork is not up to your code standards, hence i only provide it as reference material here.

TL:DR:

After deleting the user bob a comment that previously looked like this:

Hey @bob fix your issues!

Should look like this:

Hey @ghost fix your issues!

This issue is created as a part of the german EMPRI-DEVOPS project (https://empri-devops.de/) with the goal to increase the state of the art privacy protection measures outlined in the GDPR.

Screenshots

No response

Originally created by @CptPie on GitHub (May 19, 2022). ### Feature Description The basic idea behind this feature proposal is the following scenario: A developer with the handle `@bob` is leaving a project managed with Gitea and therefore deletes his account (or the administrator does so). I noticed that while all author references to bob get set to the ghost user, direct mentions via `@bob` in comments of other users stay persistent. I think it would be a good idea to add an option to the user deletion prompt to also delete mentions of that user (and setting these mentions to the ghost user). To this extend i did some work on a proof of concept implementation located here: https://github.com/cptpie/gitea/tree/empri-devops . I am fully aware that this fork is not up to your code standards, hence i only provide it as reference material here. TL:DR: After deleting the user bob a comment that previously looked like this: > `Hey @bob fix your issues!` Should look like this: > `Hey @ghost fix your issues!` This issue is created as a part of the german EMPRI-DEVOPS project (https://empri-devops.de/) with the goal to increase the state of the art privacy protection measures outlined in the GDPR. ### Screenshots _No response_
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 08:24:37 -06:00
Author
Owner

@lunny commented on GitHub (May 19, 2022):

It's difficult to replace all the text. In fact, you can prohibit the user login.

@lunny commented on GitHub (May 19, 2022): It's difficult to replace all the text. In fact, you can prohibit the user login.
Author
Owner

@CptPie commented on GitHub (May 20, 2022):

Sorry but i don't really understand the point you are trying to make.

It's difficult to replace all the text.

I won't deny that the way i did it in my proof of concept is really inefficient (since i don't really have the complete insight in how you structured your database and i might just have missed the one table to manage that part cleanly). Even though the replacing of the mention, while being a very naive approach is fairly easy and should cover most cases as is.

In fact, you can prohibit the user login.

This part i honestly don't get. The intention of the issue is NOT preventing a user to login after leaving a project or anything regarding login at all.
The intention is that after leaving a project we believe that a developer according to the so called right to be forgotten also should have the ability to get mentions of him/her deleted/anonymized (as outlined in the issue description).

@CptPie commented on GitHub (May 20, 2022): Sorry but i don't really understand the point you are trying to make. > It's difficult to replace all the text. I won't deny that the way i did it in my proof of concept is really inefficient (since i don't really have the complete insight in how you structured your database and i might just have missed the one table to manage that part cleanly). Even though the replacing of the mention, while being a very naive approach is fairly easy and should cover most cases as is. > In fact, you can prohibit the user login. This part i honestly don't get. The intention of the issue is NOT preventing a user to login after leaving a project or anything regarding login at all. The intention is that after leaving a project we believe that a developer according to the so called right to be forgotten also should have the ability to get mentions of him/her deleted/anonymized (as outlined in the issue description).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8975