vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 2f892cb866a81b698add25bb848ccad2b3c82188
parent dde7c0d99bd262cc11efad2d9e52fac37fc6a1c1
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Thu, 12 Jul 2018 23:45:41 +0200

Hide org ciphers from unconfirmed users (Showed deciption error)

Diffstat:
Msrc/db/models/cipher.rs | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs @@ -3,7 +3,7 @@ use serde_json::Value as JsonValue; use uuid::Uuid; -use super::{User, Organization, Attachment, FolderCipher, CollectionCipher, UserOrgType}; +use super::{User, Organization, Attachment, FolderCipher, CollectionCipher, UserOrgType, UserOrgStatus}; #[derive(Debug, Identifiable, Queryable, Insertable, Associations)] #[table_name = "ciphers"] @@ -266,7 +266,9 @@ impl Cipher { ciphers::table .left_join(users_organizations::table.on( ciphers::organization_uuid.eq(users_organizations::org_uuid.nullable()).and( - users_organizations::user_uuid.eq(user_uuid) + users_organizations::user_uuid.eq(user_uuid).and( + users_organizations::status.eq(UserOrgStatus::Confirmed as i32) + ) ) )) .left_join(ciphers_collections::table)