Skip to content

fix: show all invite search results returned by the server - #4081

Merged
JammingBen merged 1 commit into
mainfrom
fix/invite-search-results
Oct 30, 2026
Merged

JammingBen merged 1 commit into
mainfrom
fix/invite-search-results

Conversation

@JammingBen

@JammingBen JammingBen commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

The invite search (share sidebar and "Add members" when creating a space) filtered the server's results again on the client. It only kept recipients whose displayName or mail contained the search term. The server also matches on fields it doesn't return, e.g. onPremisesSamAccountName, and $search responses can lack mail. So valid results were dropped and the list showed "No users or groups found."

The server already filters by the term, so the client-side filter is removed and the list shows what the server returns.

Without the client filter, results from an older search could show up under a newer term, or be picked with Enter while the list was closed. Each new search now cancels the pending (debounced) and the running request. Switching the share type goes through the same path, so it clears the list and shows the spinner as well.

How to test

  • set OC_SHOW_USER_EMAIL_IN_RESULTS to false
  • login as non admin
  • share a file with a user by their email address

Related Issue

@JammingBen JammingBen self-assigned this Oct 30, 2026
@JammingBen
JammingBen force-pushed the fix/invite-search-results branch from e8d1863 to 7d70e06 Compare October 30, 2026 12:22
@JammingBen
JammingBen requested a review from kulmann October 30, 2026 12:34
}

const selectShareRoleType = async (shareRoleType: ShareRoleType) => {
const selectShareRoleType = (shareRoleType: ShareRoleType) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

any consumer that called this with await? I only see removed async in the diff, no removed await.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only the @click handler of the button calls it, no await there.

@JammingBen
JammingBen merged commit 82e32f8 into main Oct 30, 2026
28 checks passed
@JammingBen
JammingBen deleted the fix/invite-search-results branch October 30, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$search on /graph/v1.0/users omits mail field, breaking the space/file member-invite autocomplete

2 participants