TFNS / CTFNote

CTFNote is a collaborative tool aiming to help CTF teams to organise their work.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot delete user

peace-maker opened this issue · comments

When clicking the trashbin icon on a user row in /#/admin/users the user is not deleted.

db-1        | 2024-04-30 14:28:03.200 UTC [890] ERROR:  cannot cast type record to user_response
db-1        | 2024-04-30 14:28:03.200 UTC [890] DETAIL:  Input has too few columns.
db-1        | 2024-04-30 14:28:03.200 UTC [890] CONTEXT:  SQL function "delete_user" during startup
db-1        | 2024-04-30 14:28:03.200 UTC [890] STATEMENT:  with __local_0__ as (select __local_1__.* from "ctfnote"."delete_user"($1) __local_1__) select ((case when __local_0__ is null then null else __local_0__ end))::text from __local_0__
commented

@peace-maker, in my production instance I could successfully delete a user. Is this an issue in your development instance? If so, can you wipe your database by deleting the docker volume and create a new database/volume? I suspect the issue should then be gone. If this is in your production instance, I wonder how this could have happened. Maybe cached JS that sends too few data to the server?