Skip to content

Commit 0b0401c

Browse files
authored
Merge pull request #59634 from nextcloud/backport/58220/stable33
[stable33] feat(user_ldap): Add config for partial search prefix wildcard use
2 parents 95d3843 + 11a4dda commit 0b0401c

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
@@ -1572,7 +1572,12 @@ private function prepareSearchTerm(string $term): string {
15721572
if ($term === '') {
15731573
$result = '*';
15741574
} elseif ($allowEnum) {
1575-
$result = $term . '*';
1575+
$usePrefixWildcard = $this->appConfig->getValueBool('user_ldap', 'partial_search_with_prefix_wildcard', false);
1576+
if ($usePrefixWildcard) {
1577+
$result = '*' . $term . '*';
1578+
} else {
1579+
$result = $term . '*';
1580+
}
15761581
}
15771582
return $result;
15781583
}

0 commit comments

Comments
 (0)