mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #4556] Can't delete Organization when organization_api_key is present #1920
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1920
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Misterbabou on GitHub (May 15, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4556
Subject of the issue
Can't delete Organization when organization_api_key is present
Deployment environment
Your environment (Generated via diagnostics page)
Vaultwarden version: v1.30.5
Web-vault version: v2024.1.2b
Install method: Docker
Clients used: web vault, and admin panel
Reverse proxy and version: /
MySQL/MariaDB or PostgreSQL version: 11.3.2-MariaDB
Other relevant details:
Steps to reproduce
Create an Organization on the web vault
Go to your new organization-> Settings -> Organization Info : ( https://<your_url>/#/organizations/<org_uuid>/settings/account )
Generate an api_key by cliking on "VIEW API KEY" (it will generate an entry in the Table : organization_api_key
(on the Web-vault) Try to Delete Organisation -> Error message (user is then disconnected and can't show organization but it's still show on admin panel

log:
OR
log
Expected behaviour
Organization should be deleted
Actual behaviour
All entries linked to organization are deleted as usual but the organization_api_key is not that's why it can't be deleted.
To manually resolve this issue on Mariadb :
Then Organization Delete is possible
@stefan0xC commented on GitHub (May 15, 2024):
Thanks. This is probably also the cause for #4540.
@Misterbabou commented on GitHub (May 15, 2024):
Thanks for your fix ^^.
I have a question regarding events from table event on organization delete.
For now events linked to the organization are not delete on organization delete.
Will it be better to also clean events linked to this organization ?
Equivalent to :
@BlackDex commented on GitHub (May 15, 2024):
I would rather not delete events during the deletion of an organizations.
The main reason is that it could hold useful information on who deleted the organization for example, and if there were some unwanted actions done.
Logs will be delete automatically if the cleanup job is enabled.