Skip to content

Conversation

@provokateurin
Copy link
Member

@provokateurin provokateurin commented Jan 13, 2026

The code was extremely messy and unorganized, making it impossible to understand how it works. I rewrote it from scratch and it should be a lot easier to understand what the different options do now. I haven't adjusted the tests yet, as I first want to have some reviews to validate that the new implementation is correct (I don't trust the tests at all, they are pretty badly written). Do not read the diff, it's too big and useless.
This fixes one major flaw, as email full matches in combination with restriction to group weren't working, because the users to be searched for email fullmatches were empty due to the group restriction. This can also be seen in the TODO in the code, where the email search was implemented. This TODO still needs to be addressed, as the current email search implementation will not scale well. I will also add a test for this exact scenario.

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin added this to the Nextcloud 33 milestone Jan 13, 2026
@provokateurin provokateurin requested a review from a team as a code owner January 13, 2026 12:12
@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Jan 13, 2026
@provokateurin provokateurin requested review from a team, Altahrim, CarlSchwan, come-nc, nfebe, salmart-dev and yemkareems and removed request for a team January 13, 2026 12:12
$users[$user->getUID()] = $user;
$shareeEnumeration = $this->appConfig->getValueString('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
if ($shareeEnumeration) {
$shareWithGroupOnly = $this->appConfig->getValueString('core', 'shareapi_only_share_with_group_members', 'no') === 'yes';
Copy link
Contributor

Choose a reason for hiding this comment

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

use config lexicon?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I want to backport this patch, so I think it's easier to do it separately (also because it would touch a lot of other places).

This was referenced Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants