Skip to content

fix(sharing): Add isTrustedServer flag to lookup results - #56501

Merged
nfebe merged 1 commit into
masterfrom
fix/lookup-trusted-server-filter
Nov 25, 2025
Merged

fix(sharing): Add isTrustedServer flag to lookup results#56501
nfebe merged 1 commit into
masterfrom
fix/lookup-trusted-server-filter

Conversation

@nfebe

Copy link
Copy Markdown
Contributor

When show_federated_shares_to_trusted_servers_as_internal is enabled, lookup server results were being filtered out because they lacked the isTrustedServer flag. This adds the flag to lookup results by:

  • Injecting TrustedServers service into LookupPlugin
  • Adding server and isTrustedServer fields to each lookup result
  • Updating tests to reflect new structure

This ensures lookup results from trusted servers appear in internal sharing while non-trusted servers are correctly filtered out.

@nfebe
nfebe requested a review from a team as a code ownerNovember 17, 2025 22:39
@nfebe
nfebe requested review from ArtificialOwl and removed request for a teamNovember 17, 2025 22:39
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to 32

@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to 31

@nfebe
nfebe enabled auto-merge November 18, 2025 12:54
@maximelehericy

Copy link
Copy Markdown

tested and works as expected:
results from the lookup server are shown in the sharing propositions.

When `show_federated_shares_to_trusted_servers_as_internal` is enabled,
lookup server results were being filtered out because they lacked the
`isTrustedServer` flag. This adds the flag to lookup results by:
- Injecting TrustedServers service into LookupPlugin
- Adding `server` and `isTrustedServer` fields to each lookup result
- Updating tests to reflect new structure
This ensures lookup results from trusted servers appear in internal
sharing while non-trusted servers are correctly filtered out.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the fix/lookup-trusted-server-filter branch from 0d88a4f to 40246d9CompareNovember 24, 2025 22:32
@nfebe
nfebe merged commit 80b04bd into masterNov 25, 2025
203 of 207 checks passed
@nfebe
nfebe deleted the fix/lookup-trusted-server-filter branch November 25, 2025 08:44
@backportbot

Copy link
Copy Markdown

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

# Switch to the target branch and update it
git checkout 31
git pull origin 31
# Create the new backport branch
git checkout -b backport/56501/31
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick 40246d9a
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/56501/31

Error: Failed to clone repository: Failed to create working tree: Preparing worktree (new branch 'backport/56501/31')
fatal: not a valid object name: 'origin/31'


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

Copy link
Copy Markdown

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

# Switch to the target branch and update it
git checkout 32
git pull origin 32
# Create the new backport branch
git checkout -b backport/56501/32
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick 40246d9a
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/56501/32

Error: Failed to clone repository: Failed to create working tree: Preparing worktree (new branch 'backport/56501/32')
fatal: not a valid object name: 'origin/32'


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for freeto 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

@nfebe@maximelehericy@CarlSchwan@provokateurin@come-nc