mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-06 09:13:03 +03:00
[PR #12] [MERGED] Decoupling user from cipher #3923
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/12
Author: @mprasil
Created: 4/27/2018
Status: ✅ Merged
Merged: 5/4/2018
Merged by: @dani-garcia
Base:
master← Head:user_decoupling📝 Commits (4)
514a372Add per-user folder-cipher mappingc3be1b4Fix FolderCipher creation, handle some errorsa0796acImplement suggested improvementsc4360eeSave extra query when checking write access📊 Changes
9 files changed (+215 additions, -47 deletions)
View changed files
➕
migrations/2018-04-27-155151_create_users_ciphers/up.sql(+32 -0)📝
src/api/core/ciphers.rs(+27 -24)📝
src/api/core/organizations.rs(+4 -3)📝
src/db/models/cipher.rs(+86 -11)📝
src/db/models/collection.rs(+10 -2)📝
src/db/models/folder.rs(+43 -2)📝
src/db/models/mod.rs(+1 -1)📝
src/db/models/organization.rs(+1 -1)📝
src/db/schema.rs(+11 -3)📄 Description
This is very much work in progress, definitely not ready to be pulled yet - does not even compile at the moment. I'm just putting it out there to see your thoughts about this.
I took your migration script from #10 and made an attempt at decoupling the users from the ciphers. I went a bit further and removed user_uuid from cipher completely - we can manage that ownership in the
users_cipherstable. That also means that the folder_uuid in that table might benullin case the cipher is not in any folder.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.