From fa80d4c1f9f4412aa24b35b1cb7f888f1a7f3ee7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 22 Oct 2020 18:06:10 +0200 Subject: [PATCH] * ActiveDirectory/Mail: fix groups as distribution lists --- api/src/Contacts/Ads.php | 1 + api/src/Contacts/Ldap.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/Contacts/Ads.php b/api/src/Contacts/Ads.php index 69d402e67f..4bb2202c8f 100644 --- a/api/src/Contacts/Ads.php +++ b/api/src/Contacts/Ads.php @@ -104,6 +104,7 @@ class Ads extends Ldap // get filter for accounts (incl. additional filter from setup) $this->accountsFilter = $this->accounts_ads->type_filter('u', true); + $this->contactsFilter = "(|(objectclass=contact)$this->accountsFilter)"; if ($ds) { diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index f475de51ba..a1c93e955d 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -77,6 +77,12 @@ class Ldap */ var $accountsFilter = '(objectclass=posixaccount)'; + /** + * Filter used for all addressbooks + * @var string + */ + var $contactsFilter = '(objectclass=inetorgperson)'; + /** * @var string $allContactsDN holds the base DN of all addressbook */ @@ -832,7 +838,7 @@ class Ldap $objectFilter = $this->accountsFilter; break; default: - $objectFilter = '(objectclass=inetorgperson)'; + $objectFilter = $this->contactsFilter; break; } // exclude expired accounts