api: add default property to domain list

This commit is contained in:
Dietmar Maurer 2020-04-09 13:35:08 +02:00
parent 73b40e9b46
commit 879546aff6

View File

@ -23,6 +23,10 @@ use crate::api2::types::*;
schema: SINGLE_LINE_COMMENT_SCHEMA,
optional: true,
},
default: {
description: "Default realm.",
type: bool,
}
},
}
}
@ -33,7 +37,7 @@ use crate::api2::types::*;
/// box (before the user is authenticated).
fn list_domains() -> Result<Value, Error> {
let mut list = Vec::new();
list.push(json!({ "realm": "pam", "comment": "Linux PAM standard authentication" }));
list.push(json!({ "realm": "pam", "comment": "Linux PAM standard authentication", "default": true }));
list.push(json!({ "realm": "pbs", "comment": "Proxmox Backup authentication server" }));
Ok(list.into())
}