mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-16 14:42:42 +00:00
Fix editing users in Organization
This commit is contained in:
parent
b1ac37609f
commit
049aa33f17
2 changed files with 32 additions and 22 deletions
|
@ -270,6 +270,13 @@ impl UserOrganization {
|
|||
.first::<Self>(&**conn).ok()
|
||||
}
|
||||
|
||||
pub fn find_by_uuid_and_org(uuid: &str, org_uuid: &str, conn: &DbConn) -> Option<Self> {
|
||||
users_organizations::table
|
||||
.filter(users_organizations::uuid.eq(uuid))
|
||||
.filter(users_organizations::org_uuid.eq(org_uuid))
|
||||
.first::<Self>(&**conn).ok()
|
||||
}
|
||||
|
||||
pub fn find_by_user(user_uuid: &str, conn: &DbConn) -> Vec<Self> {
|
||||
users_organizations::table
|
||||
.filter(users_organizations::user_uuid.eq(user_uuid))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue