Skip to content

Commit 812d0df

Browse files
committed
feat(user_ldap): Add config for partial search compatibility with ActiveDirectory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 313fddb commit 812d0df

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/user_ldap/lib/Access.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,12 @@ private function prepareSearchTerm(string $term): string {
15801580
if ($term === '') {
15811581
$result = '*';
15821582
} elseif ($allowEnum !== 'no') {
1583-
$result = $term . '*';
1583+
$activeDirectoryCompat = $this->appConfig->getValueBool('user_ldap', 'partial_search_active_directory_compatibility', false);
1584+
if ($activeDirectoryCompat) {
1585+
$result = '*' . $term . '*';
1586+
} else {
1587+
$result = $term . '*';
1588+
}
15841589
}
15851590
return $result;
15861591
}

0 commit comments

Comments
 (0)