mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 04:57:00 +01:00
Add upg to radius
This commit is contained in:
parent
8a4d524d54
commit
ff8711592e
|
@ -22,7 +22,15 @@ pub struct Group {
|
||||||
|
|
||||||
macro_rules! try_from_account_e {
|
macro_rules! try_from_account_e {
|
||||||
($au:expr, $value:expr, $qs:expr) => {{
|
($au:expr, $value:expr, $qs:expr) => {{
|
||||||
let groups: Vec<Group> = match $value.get_ava_reference_uuid("memberof") {
|
let name = $value.get_ava_single_string("name").ok_or_else(|| {
|
||||||
|
OperationError::InvalidAccountState("Missing attribute: name".to_string())
|
||||||
|
})?;
|
||||||
|
|
||||||
|
let uuid = *$value.get_uuid();
|
||||||
|
|
||||||
|
let upg = Group { name, uuid };
|
||||||
|
|
||||||
|
let mut groups: Vec<Group> = match $value.get_ava_reference_uuid("memberof") {
|
||||||
Some(l) => {
|
Some(l) => {
|
||||||
// given a list of uuid, make a filter: even if this is empty, the be will
|
// given a list of uuid, make a filter: even if this is empty, the be will
|
||||||
// just give and empty result set.
|
// just give and empty result set.
|
||||||
|
@ -48,6 +56,7 @@ macro_rules! try_from_account_e {
|
||||||
vec![]
|
vec![]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
groups.push(upg);
|
||||||
Ok(groups)
|
Ok(groups)
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue