mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-22 16:14:20 -05:00
[PR #19] [MERGED] Remove dependent items when removing cipher #20778
Reference in New Issue
Block a user
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/19
Author: @mprasil
Created: 5/15/2018
Status: ✅ Merged
Merged: 5/15/2018
Merged by: @dani-garcia
Base:
master← Head:cipher_deleting📝 Commits (1)
21c1ab7Remove dependent items when removing cipher📊 Changes
6 files changed (+51 additions, -32 deletions)
View changed files
📝
src/api/core/accounts.rs(+4 -3)📝
src/api/core/ciphers.rs(+12 -15)📝
src/db/models/attachment.rs(+12 -6)📝
src/db/models/cipher.rs(+11 -8)📝
src/db/models/collection.rs(+6 -0)📝
src/db/models/folder.rs(+6 -0)📄 Description
This makes sure, that we delete all dependent records (
Attachment,FolderCipher,CollectionCipher) before deleting Cipher itself. Otherwise the deleting will fail.This also implements better error handling (#6) for
deleteand moves some functionality out of request handling undercipher.rs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.