dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
34.78k stars 1.69k forks source link

Error deleting organisation if it has no member left. #4540

Closed Velhenn closed 2 months ago

Velhenn commented 2 months ago

Error while trying to delete an organisation with no members

An organisation was created for test purposes, to which I was the sole member. I removed the user from the organisation, then tried to delete it. The admin console returns the following error : "Error deleting organisation Error saving organisation"

### Environment (Generated via diagnostics page)
* Vaultwarden version: v1.30.5
* Web-vault version: v2024.1.2b
* OS/Arch: linux/x86_64
* Running within a container: true (Base: Debian)
* Environment settings overridden: true
* Uses a reverse proxy: true
* IP Header check: true (X-Real-IP)
* Internet access: true
* Internet access via a proxy: false
* DNS Check: true
* Browser/Server Time Check: true
* Server/NTP Time Check: true
* Domain Configuration Check: true
* HTTPS Check: true
* Database type: SQLite
* Database version: 3.44.0
* Clients used: 
* Reverse proxy and version: 
* Other relevant information: 
stefan0xC commented 2 months ago

I removed the user from the organisation

How did you do that? If I try to leave or remove myself from the organization I get an error message that tells me that "The last owner can't leave".

BlackDex commented 2 months ago

If you manually removed a user, then i suggest to also manually remove the org, because that is the only way this could have happened i think.