Skip to content

Panic when admin tries to delete a user with purge=true #20442

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

Closed
dhruvmanila opened this issue Jul 21, 2022 · 0 comments · Fixed by #20443
Closed

Panic when admin tries to delete a user with purge=true #20442

dhruvmanila opened this issue Jul 21, 2022 · 0 comments · Fixed by #20443
Labels

Comments

@dhruvmanila
Copy link
Contributor

Description

As an admin, when you try to delete a user with purge=true, it panics. This is done using the API, so the url would be something like https://localhost:3000/api/v1/admin/users/foo?purge=true.

Gitea Version

c0f5111

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/dhruvmanila/9c8a2c45dd31247dd993cfbfa3db2922

Screenshots

No response

Git Version

No response

Operating System

macOS

How are you running Gitea?

Running locally using make watch command on the command-line.

Steps to reproduce:

  1. Create an admin user
  2. Create 2 non-admin user
  3. Using httpie, run http :3000/api/v1/admin/users/{username}?purge=false --auth username:password for the first user and then use purge=true for the second user

When purge is true, it panics.

Database

PostgreSQL

@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant