minor: Add objectclass in user search response
This commit is contained in:
parent
89995a0386
commit
ace9515f6e
1 changed files with 7 additions and 0 deletions
|
|
@ -156,6 +156,13 @@ fn search_entry_from_user(user: &User, req_attrs: &[String]) -> LdapSearchResult
|
||||||
"cn" | "mail" => Some(vec![user.mail.clone()]),
|
"cn" | "mail" => Some(vec![user.mail.clone()]),
|
||||||
// TODO: group membership
|
// TODO: group membership
|
||||||
"memberof" => Some(vec![]),
|
"memberof" => Some(vec![]),
|
||||||
|
// Copied from lldap output, not sure if we want to add/remove some classes depending on context
|
||||||
|
"objectclass" => Some(
|
||||||
|
vec!["inetOrgPerson", "posixAccount", "mailAccount", "person"]
|
||||||
|
.into_iter()
|
||||||
|
.map(String::from)
|
||||||
|
.collect(),
|
||||||
|
),
|
||||||
_ => {
|
_ => {
|
||||||
tracing::warn!("Ignoring unknown attr in search query: {attr}");
|
tracing::warn!("Ignoring unknown attr in search query: {attr}");
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue