Implemented some admin methods, inserted CollectionsUsers only when Org accessAll == false, and implemented find_collection when user has access_all in Org

This commit is contained in:
Daniel García
2018-05-04 19:25:50 +02:00
parent 92236394e6
commit 0cb58add54
5 changed files with 108 additions and 64 deletions

View File

@@ -21,3 +21,19 @@ type EmptyResult = Result<(), BadRequest<Json>>;
struct PasswordData {
masterPasswordHash: String
}
#[derive(Deserialize)]
#[serde(untagged)]
enum NumberOrString {
Number(i32),
String(String),
}
impl NumberOrString {
fn to_string(self) -> String {
match self {
NumberOrString::Number(n) => n.to_string(),
NumberOrString::String(s) => s
}
}
}