Skip to content
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

Allow autocomplete based on phone sync #26031

Merged

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Mar 9, 2021

  • Based on Provisioning API to IBootstrap #26029
  • Store phonebook sync matches in a database
  • Remove "known user" matches when the user changes their phone number
  • Remove any matches when the user is deleted
  • Add a config option to "Restrict username autocompletion to users with phone sync matches" in the sharing settings
    • (needs some thinking how we can phrase it so it works with the existing options in a good way)
  • Respect that setting on the autocomplete endpoint.
  • Write integration tests to assure this doesn't break

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feature/noid/allow-autocomplete-based-on-phone-sync branch 2 times, most recently from 58edfee to fb933ed Compare March 10, 2021 14:22
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feature/noid/allow-autocomplete-based-on-phone-sync branch from c122f9b to f7d1cf0 Compare March 10, 2021 16:20
…or same group

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feature/noid/allow-autocomplete-based-on-phone-sync branch from f7d1cf0 to 5b53b6f Compare March 10, 2021 16:26
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen marked this pull request as ready for review March 10, 2021 17:37
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I squinted but the code looks fine

Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 code looks fine with minor comments

and one thing that disturbed me most was the naming of $knownTo and $knownUser which are easy to mix up

lib/private/Contacts/ContactsMenu/ContactsStore.php Outdated Show resolved Hide resolved
lib/private/Contacts/ContactsMenu/ContactsStore.php Outdated Show resolved Hide resolved
lib/private/KnownUser/KnownUserMapper.php Show resolved Hide resolved
lib/private/KnownUser/KnownUserMapper.php Show resolved Hide resolved
lib/private/KnownUser/KnownUserService.php Show resolved Hide resolved
lib/private/KnownUser/KnownUserService.php Outdated Show resolved Hide resolved
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the feature/noid/allow-autocomplete-based-on-phone-sync branch from 5ddb55c to b4f6aca Compare March 10, 2021 19:49
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nickvergessen nickvergessen added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Mar 10, 2021
@nickvergessen
Copy link
Member Author

/backport to stable21

@nickvergessen nickvergessen requested a review from blizzz March 10, 2021 20:49
@nickvergessen nickvergessen merged commit 56b08c0 into master Mar 11, 2021
@nickvergessen nickvergessen deleted the feature/noid/allow-autocomplete-based-on-phone-sync branch March 11, 2021 07:29
@backportbot-nextcloud
Copy link

The backport to stable21 failed. Please do this backport manually.

@skjnldsv
Copy link
Member

@nickvergessen Documentation missing?

@nickvergessen
Copy link
Member Author

How to upload your phone's addressbook? Or the admin setting?

@skjnldsv
Copy link
Member

How to upload your phone's addressbook? Or the admin setting?

admin setting

'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'),
'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'),
'restrictUserEnumerationToPhone' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no'),
'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'),
'restrictUserEnumerationFullMatchUserId' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'),
'restrictUserEnumerationFullMatchEmail' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes'),
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no'),

@nickvergessen
Copy link
Member Author

Added the new checkbox in nextcloud/documentation#11241 and updated the screenshot and labels that were brought in by other changes in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants