server: return groups in memberof by cn instead of uid

Fixes #468.
This commit is contained in:
Valentin Tolmer
2023-03-20 21:36:27 +01:00
committed by nitnelave
parent 91ada70c7d
commit 46b8f2a8a5
2 changed files with 2 additions and 6 deletions

View File

@@ -45,11 +45,7 @@ pub fn get_user_attribute(
.into_iter()
.flatten()
.map(|id_and_name| {
format!(
"uid={},ou=groups,{}",
&id_and_name.display_name, base_dn_str
)
.into_bytes()
format!("cn={},ou=groups,{}", &id_and_name.display_name, base_dn_str).into_bytes()
})
.collect(),
"cn" | "displayname" => vec![user.display_name.clone()?.into_bytes()],