Repository navigation
fix(mount-provider): Pass the recipient to the federated share storage - #3060
Open
DerDreschner wants to merge 1 commit into
Open
DerDreschner wants to merge 1 commit into
DerDreschner wants to merge 1 commit into
Conversation
Since Nextcloud 34.0.5 / 35.0.2, the federated share storage requires the user receiving the share as `recipient` option. Team mounts didn't pass it, so setting up the filesystem of a user with a team share from a remote instance failed with an `Undefined array key "recipient"` exception. This aborted e.g. `occ versions:expire` and `occ versions:cleanup`. Pass the user the mounts are set up for from getMountsForUser() and getMountsForPath() to the storage. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
Author
|
/backport to stable35 |
Author
|
/backport to stable34 |
DerDreschner
requested review from
cristianscheid
and
a balanced review from Copilot
October 16, 2026 14:45
DerDreschner
enabled auto-merge
October 16, 2026 14:46
There was a problem hiding this comment.
馃煝 Approval recommended
Both mount-loading paths supply the required recipient, with regression coverage and no blocking issues identified; tests were not executed.
0 open findings
What changed in this PR
Fixes remote team mounts by passing the receiving user to federated share storage, preventing missing-recipient failures during filesystem setup.
Changes:
- Passes the recipient through both mount-loading paths.
- Includes the recipient in storage options.
- Adds regression tests for recipient propagation and storage creation.
| File | Description |
|---|---|
| tests/鈥媢nit/鈥媗ib/鈥婱ountManager/鈥婥ircleMountProviderTest.php | Tests recipient propagation and external storage creation. |
| lib/鈥婱ountManager/鈥婥ircleMountProvider.php | Supplies the user through both mount-loading paths. |
| lib/鈥婱odel/鈥婱ount.php | Stores and exposes the recipient in storage options. |
馃 Review effort: Balanced
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cristianscheid
approved these changes
Oct 16, 2026
Member
There was a problem hiding this comment.
Looks good to me. I tested this, and seems to work as expected:
- as alice on nc1, created test_team and added bob from nc2
- as alice on nc1, shared test_folder with test_team
- as bob on nc2, I can see and access test_folder from his files
Before this fix, I was running into following exception when accessing file as bob on nc2:
"Cannot assign null to property OCA\\Files_Sharing\\External\\Storage::$recipientUser of type OCP\\IUser in file '/var/www/html/apps/files_sharing/lib/External/Storage.php' line 91"
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since Nextcloud 34.0.5 / 35.0.2, the federated share storage requires the user receiving the share as
recipientoption. Team mounts didn't pass it, so setting up the filesystem of a user with a team share from a remote instance failed with anUndefined array key "recipient"exception. This aborted e.g.occ versions:expireandocc versions:cleanup.Pass the user the mounts are set up for from getMountsForUser() and getMountsForPath() to the storage.
Checklist
3. to review, feature component)stable32)AI (if applicable)