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 user with its repositories & organization memberships #15588

Closed
2 of 6 tasks
a1batross opened this issue Apr 22, 2021 · 11 comments · Fixed by #18064
Closed
2 of 6 tasks

delete user with its repositories & organization memberships #15588

a1batross opened this issue Apr 22, 2021 · 11 comments · Fixed by #18064
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@a1batross
Copy link

  • Gitea version (or commit ref): 1.14.1 from GitHub Releases
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No

I recently had a spam attack on my open Gitea instance.

Spammers seems are targeted for the Gitea instances, as some accounts created several repositories or created and joined organizations. The problem is, I can't delete these accounts with one command or click.

Nor CLI, nor Web admin panel gives me anything to purge everything made by these bots.

@6543
Copy link
Member

6543 commented Apr 22, 2021

I would propose a "purge user" function for admins ...
-> delete user, deletes a user & his membership
-> purge user, deletes all a user has done ...

@a1batross
Copy link
Author

@6543 that seems fine to me.

Anything better than deleting repositories one by one.

@lunny
Copy link
Member

lunny commented Apr 22, 2021

Or a flag --force.

@silverwind
Copy link
Member

I too would like such an option on the admin UI to delete a user along with all its memberships.

@silverwind silverwind added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Apr 22, 2021
@6543 6543 changed the title Can't delete user if user has repositories or joined organizations delete user with its repositories & organization memberships Apr 22, 2021
@mewalig
Copy link

mewalig commented Oct 5, 2021

Is there any back-end administrative script that can do this (e.g. a script that runs a few lines of SQL)?

@fnetX
Copy link
Contributor

fnetX commented Nov 17, 2021

Does it already help anyone to provide an API function here? Either an option to remove a user including everything, or a separate that removes a user with all the data that can be run after some kind of confirmation.

@mewalig
Copy link

mewalig commented Nov 17, 2021

API would be great.

As far as options: even better would be the option for the account deletion to merely disable the account without deleting it, so that all of the data related to the user account remains intact. Perhaps such an option exists that I'm not aware of, in which case please disregard this comment. If not, there are a wide range of business, operational and/or legal reasons why disabling may be preferable-- or necessary-- in lieu of deleting.

Also important to consider is that it may be desirable for peripheral content created under that account-- such as, for example, comments to some issue related to someone else's repo-- to remain (imagine trying to read an issue history with a key participant's comments removed). There are surely also regulatory considerations related to users' control of content as well, and in a world where regulatory requirements can quickly change, flexibility is even more valuable.

Worth making the connection as well that related to these considerations is the ability to export data related to a specific account i.e. #1446 and #4351

@fnetX
Copy link
Contributor

fnetX commented Mar 2, 2022

By the way, because the link doesn't exist, there is #18064.

@stale
Copy link

stale bot commented May 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label May 1, 2022
@6543 6543 added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label May 1, 2022
@stale stale bot removed the issue/stale label May 1, 2022
zeripath added a commit that referenced this issue Jul 14, 2022
Add the ability to purge users when deleting them.

Close #15588

Signed-off-by: Andrew Thornton <[email protected]>
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 10, 2022
Add the ability to purge users when deleting them.

Close go-gitea#15588

Signed-off-by: Andrew Thornton <[email protected]>
@MightyPork
Copy link

Hi, can I ask how to use this feature? I'm using 1.17.3

A common pattern of spam on my gitea is that a user signs up and creates an empty repository (or several) with ads and links. The user can't be deleted through the admin UI, because it has repositories. The spam repositories have to be deleted one at a time.

This spam vector greatly dropped in popularity when I disabled sign-ups other than through github, but it's still happening.

Screenshot_20221114_105415

Screenshot_20221114_105510

Screenshot_20221114_105520

@zeripath
Copy link
Contributor

The feature is in 1.18 so would be in dev, 1.18-dev or 1.18-rc0

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants