Browse Source

Fix the list of users with access to a collection to display correctly.

https://github.com/dani-garcia/bitwarden_rs/issues/364
pull/365/head
Stephen White 6 years ago
parent
commit
928ad6c1d8
  1. 6
      src/api/core/organizations.rs
  2. 10
      src/db/models/organization.rs

6
src/api/core/organizations.rs

@ -375,11 +375,7 @@ fn get_collection_users(org_id: String, coll_id: String, _headers: AdminHeaders,
}) })
.collect(); .collect();
Ok(Json(json!({ Ok(Json(json!(user_list)))
"Data": user_list,
"Object": "list",
"ContinuationToken": null,
})))
} }
#[derive(FromForm)] #[derive(FromForm)]

10
src/db/models/organization.rs

@ -296,14 +296,8 @@ impl UserOrganization {
let user = User::find_by_uuid(&self.user_uuid, conn).unwrap(); let user = User::find_by_uuid(&self.user_uuid, conn).unwrap();
json!({ json!({
"OrganizationUserId": self.uuid, "Id": self.uuid,
"AccessAll": self.access_all, "ReadOnly": read_only
"Name": user.name,
"Email": user.email,
"Type": self.type_,
"Status": self.status,
"ReadOnly": read_only,
"Object": "collectionUser",
}) })
} }

Loading…
Cancel
Save