-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dav principal search to honour sharing.maxAutocompleteResults setting #24659
dav principal search to honour sharing.maxAutocompleteResults setting #24659
Conversation
@@ -72,7 +72,7 @@ public function __construct() { | |||
$proxyMapper, | |||
\OC::$server->getConfig() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\OC::$server->getConfig() | |
$config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the userSession further up. And then using get
over the deprecated getters. And then DI, at least the container. I agree, but that's better kept in a separate PR. I am afraid of an endless rat-tail here.
@@ -205,10 +212,11 @@ public function searchPrincipals($prefixPath, array $searchProperties, $test = ' | |||
$restrictGroups = $this->groupManager->getUserGroupIds($user); | |||
} | |||
|
|||
$searchLimit = $this->config->getSystemValue('sharing.maxAutocompleteResults', null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cast to int|null, just to be sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c8a933e
to
8e9b308
Compare
/compile /apps/files_sharing/ |
- it is being used on frontend by users - user and big instances benefit from quicker results and less load Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fc1c05e
to
d8ad4ef
Compare
/compile /apps/files_sharing/ |
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This crossed me when investigating a different issue. When using the calendar app to share the calendar, the DAV search is being used. There is not limit, and if I remember correctly the DAV protocol does not foresee to submit a value (correct me if i am wrong). When typing 'pow' in the search field, first I thought I ended up in an infinite loop (for some other changes i did). But in fact, it just searches the LDAP until the very end, resulting in 438 users in the results.
The limitation speeds up finding users and groups, increasing response time for end users and decreasing load on the servers.
Question: for now I left the default behaviour as unlimited, but would prefer to limit it to 25 as it is done in most other places. Objections? And, are there any fundamental objects to this change?