From c964428858550f59a601b8c20a54e400fe10f74d Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Mon, 8 Nov 2021 09:21:32 +0100 Subject: [PATCH] fixup: group filters --- server/src/infra/ldap_handler.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs index daa3132..f47ab3a 100644 --- a/server/src/infra/ldap_handler.rs +++ b/server/src/infra/ldap_handler.rs @@ -1102,10 +1102,13 @@ mod tests { let mut ldap_handler = setup_bound_handler(mock).await; let request = make_search_request( "ou=groups,dc=example,dc=com", - LdapFilter::Equality( - "uniqueMember".to_string(), - "cn=bob,ou=people,dc=example,dc=com".to_string(), - ), + LdapFilter::And(vec![ + LdapFilter::Equality( + "uniqueMember".to_string(), + "cn=bob,ou=people,dc=example,dc=com".to_string(), + ), + LdapFilter::Equality("objectclass".to_string(), "groupOfUniqueNames".to_string()), + ]), vec!["cn"], ); assert_eq!(