1
0
Fork 0
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:
Miroslav Prasil 2018-05-11 14:24:41 +01:00
commit dfb1232081
2 changed files with 20 additions and 4 deletions

View file

@ -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(&current_collections) {
match Collection::find_by_uuid(&collection, &conn) {