Skip to content

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

Closed
@dhruvmanila

Description

@dhruvmanila

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions