Skip to content

Commit cb0801a

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

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
@@ -1576,7 +1576,12 @@ private function prepareSearchTerm(string $term): string {
15761576
if ($term === '') {
15771577
$result = '*';
15781578
} elseif ($allowEnum !== 'no') {
1579-
$result = $term . '*';
1579+
$activeDirectoryCompat = $this->appConfig->getValueBool('user_ldap', 'partial_search_active_directory_compatibility', false);
1580+
if ($activeDirectoryCompat) {
1581+
$result = '*' . $term . '*';
1582+
} else {
1583+
$result = $term . '*';
1584+
}
15801585
}
15811586
return $result;
15821587
}

0 commit comments

Comments
 (0)