Merge pull request #58280 from nextcloud/backport/58220/stable32

[stable32] feat(user_ldap): Add config for partial search compatibility with ActiveDirectory
This commit is contained in:
Marcel Klehr 2026-05-04 09:40:40 +02:00 committed by GitHub
commit 532d4c8242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1576,7 +1576,12 @@ class Access extends LDAPUtility {
if ($term === '') {
$result = '*';
} elseif ($allowEnum !== 'no') {
$result = $term . '*';
$activeDirectoryCompat = $this->appConfig->getValueBool('user_ldap', 'partial_search_active_directory_compatibility', false);
if ($activeDirectoryCompat) {
$result = '*' . $term . '*';
} else {
$result = $term . '*';
}
}
return $result;
}