can't delete users who have changed their default project to a shared project #1595

Closed
opened 2023-08-25 11:34:15 +00:00 by hboetes · 1 comment

Description

Whilst trying to delete a user who has changed their default project to a shared project they don't own you will run into:

root@llama ~ #  vikunja user delete 7 --now
2023/08/25 13:22:18 Using config file: /etc/vikunja/config.yml
2023-08-25T13:22:18.41309046+02:00: INFO	▶ migration/Migrate 052 Ran all migrations successfully.
2023-08-25T13:22:18.413236207+02:00: DEBUG	▶ models/RegisterReminderCron 053 [Task Reminder Cron] Timezone is UTC
You requested to delete the user immediately. Are you sure?
To confirm, please type "yes, I confirm" in all uppercase:
YES, I CONFIRM
2023-08-25T13:22:20.013336522+02:00: CRITICAL	▶ cmd/func22 0be Error removing the user: Default project cannot be deleted [ProjectID: 29]

Make sense. The deletion process should only delete projects owned by them.

Vikunja Frontend Version

does not apply

Vikunja API Version

Vikunja api version v0.21.0 Built with go1.20.5

Browser and version

does not apply

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

### Description Whilst trying to delete a user who has changed their default project to a shared project they don't own you will run into: ```console root@llama ~ # vikunja user delete 7 --now 2023/08/25 13:22:18 Using config file: /etc/vikunja/config.yml 2023-08-25T13:22:18.41309046+02:00: INFO ▶ migration/Migrate 052 Ran all migrations successfully. 2023-08-25T13:22:18.413236207+02:00: DEBUG ▶ models/RegisterReminderCron 053 [Task Reminder Cron] Timezone is UTC You requested to delete the user immediately. Are you sure? To confirm, please type "yes, I confirm" in all uppercase: YES, I CONFIRM 2023-08-25T13:22:20.013336522+02:00: CRITICAL ▶ cmd/func22 0be Error removing the user: Default project cannot be deleted [ProjectID: 29] ``` Make sense. The deletion process should only delete projects owned by them. ### Vikunja Frontend Version does not apply ### Vikunja API Version Vikunja api version v0.21.0 Built with go1.20.5 ### Browser and version does not apply ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
hboetes added the
kind/bug
label 2023-08-25 11:34:15 +00:00
Owner

Fixed in 693a77ae51. Please check with the next unstable build if the problem went away.

Fixed in https://kolaente.dev/vikunja/api/commit/693a77ae5181648876bc8bb470834b20b37d37bd. Please check with the next unstable build if the problem went away.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1595
No description provided.