mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-04 18:19:08 +00:00
Filter collection lists based on user
This commit is contained in:
parent
9cf449e1c5
commit
dfb1232081
2 changed files with 20 additions and 4 deletions
|
@ -318,7 +318,7 @@ fn post_collections_admin(uuid: String, data: Json<CollectionsAdminData>, header
|
|||
}
|
||||
|
||||
let posted_collections: HashSet<String> = data.collectionIds.iter().cloned().collect();
|
||||
let current_collections: HashSet<String> = cipher.get_collections(&conn).iter().cloned().collect();
|
||||
let current_collections: HashSet<String> = cipher.get_collections(&headers.user.uuid ,&conn).iter().cloned().collect();
|
||||
|
||||
for collection in posted_collections.symmetric_difference(¤t_collections) {
|
||||
match Collection::find_by_uuid(&collection, &conn) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue