Repository navigation
fix(mount-provider): Pass the recipient to the federated share storage - #3060
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>
|
/backport to stable35 |
|
/backport to stable34 |
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/unit/lib/MountManager/CircleMountProviderTest.php | Tests recipient propagation and external storage creation. |
| lib/MountManager/CircleMountProvider.php | Supplies the user through both mount-loading paths. |
| lib/Model/Mount.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.
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"
|
@DerDreschner any idea why the backport bot did not open the PRs? |
|
@cristianscheid I have no idea. Looks like we should be able to see it through Settings -> Developer Settings -> GitHub Apps, but I have no access to that on this repo. I'll try again. |
|
/backport to stable35 |
|
/backport to stable34 |
|
/backport to stable33 |
|
Wheee. I'll fix the drafts tomorrow. |
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)