Skip to content

Commit 9a819b1

Browse files
marcelklehrmiaulalala
authored andcommitted
feat(user_ldap): Add config for partial search compatibility with ActiveDirectory
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 018bc55 commit 9a819b1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/user_ldap/lib/Access.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,12 @@ private function prepareSearchTerm(string $term): string {
15721572
if ($term === '') {
15731573
$result = '*';
15741574
} elseif ($allowEnum) {
1575-
$result = $term . '*';
1575+
$activeDirectoryCompat = $this->appConfig->getValueBool('user_ldap', 'partial_search_active_directory_compatibility', false);
1576+
if ($activeDirectoryCompat) {
1577+
$result = '*' . $term . '*';
1578+
} else {
1579+
$result = $term . '*';
1580+
}
15761581
}
15771582
return $result;
15781583
}

0 commit comments

Comments
 (0)