ldap: Improve support for group filters

This commit is contained in:
Valentin Tolmer 2021-11-07 14:56:48 +01:00 committed by nitnelave
parent e68d46d4fe
commit f98023e67f

View File

@ -585,7 +585,9 @@ impl<Backend: BackendHandler + LoginHandler + OpaqueHandler> LdapHandler<Backend
bail!("Unsupported group filter: {:?}", filter)
}
}
LdapFilter::And(v) if v.is_empty() => Ok(None),
LdapFilter::And(v) => v
.iter()
.fold(Ok(None), |o, f| Ok(o?.xor(self.get_group_filter(f)?))),
_ => bail!("Unsupported group filter: {:?}", filter),
}
}