aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2018-07-12 23:54:56 +0200
committerDaniel García <[email protected]>2018-07-12 23:54:56 +0200
commitbe4e6c6f0ce6692c29d3dc3721d9a64b64c647f8 (patch)
tree176135f098553de31e9ddd9ce6309d86a63fe985
parent4f6f510bd47e25096c2fac07c66e1a6874623973 (diff)
parent2f892cb866a81b698add25bb848ccad2b3c82188 (diff)
downloadvaultwarden-be4e6c6f0ce6692c29d3dc3721d9a64b64c647f8.tar.gz
vaultwarden-be4e6c6f0ce6692c29d3dc3721d9a64b64c647f8.zip
Merge branch 'master' into u2f
-rw-r--r--src/db/models/cipher.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs
index 6639f3e8..899e5dda 100644
--- 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)