-
Notifications
You must be signed in to change notification settings - Fork 2.1k
obey user min search length configuration on remote shares #35977
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
Conversation
Note: I have asked for the drone JavaScript cache problem to be fixed. CI is broken because of that. |
I think we should clarify first what is the expected behaviour. If you're looking for users in the remote server, I expect the remote server to return users based on whatever is configured there. If the remote server has a value of Note that there are at least a couple of cases to check:
I guess this is for the first case where the local server has a greater restriction. However, since the search is done in the remote server, I think only the remote server's configuration should apply. If the local server wants to apply additional restrictions, I think it's better to use a different config key. Alternatively, I think it's better if the local server doesn't make the request to the remote server in the first place. Basically, if the local configuration has Both cases described above are handled the same way without any modification. |
1cf8a8f
to
6805173
Compare
Codecov Report
@@ Coverage Diff @@
## master #35977 +/- ##
============================================
+ Coverage 66.43% 66.69% +0.26%
- Complexity 20183 20184 +1
============================================
Files 1233 1233
Lines 68965 69001 +36
============================================
+ Hits 45814 46020 +206
+ Misses 23151 22981 -170
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #35977 +/- ##
============================================
+ Coverage 66.43% 66.69% +0.26%
- Complexity 20183 20184 +1
============================================
Files 1233 1233
Lines 68965 69001 +36
============================================
+ Hits 45814 46020 +206
+ Misses 23151 22981 -170
Continue to review full report at Codecov.
|
@jvillafanez As far I see from the code, there is no request for the remote server. We are only searching in the local address book. If we have an exact match, we are returning the result whatever search length. It is intended behavior and I did not change this behavior. If there is no exact match, currently, if there are half-matched results in contacts, the API returns these results. Also, if the search string matches with the remote user format, the API adds the string itself to returned results. I just added a length control for this non-exact match scenario. |
Description
Currently, sharing API is not respecting
user.min_search_length
configuration when returning remote users. This PR aims to fix this behavior.The API should return exact matches even
search_min_length
is not enough. For that reason, the PR only changes behavior on the non-exact match scenario.Related Issue
https://github.com/owncloud/enterprise/issues/3438
Motivation and Context
Fixing bug.
How Has This Been Tested?
Unit tests and manually with the following steps:
u@co
, share dialog should includeu@co
u@co
, share dialog should not includeu@co
Types of changes
Checklist: