1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-06-10 21:13:53 +00:00

Implement cipher sharing

This commit is contained in:
Miroslav Prasil 2018-05-14 16:13:59 +01:00
parent a00ecf228d
commit 8b18c4c633
3 changed files with 55 additions and 3 deletions

View file

@ -224,6 +224,10 @@ impl UserOrganization {
}
}
pub fn has_full_access(self) -> bool {
self.access_all || self.type_ < UserOrgType::User as i32
}
pub fn find_by_uuid(uuid: &str, conn: &DbConn) -> Option<Self> {
users_organizations::table
.filter(users_organizations::uuid.eq(uuid))