Skip to content

fix(dav): allow moving files between subfolders of the same share - #64106

Open
Antreesy wants to merge 2 commits into
masterfrom
fix/56727/team-folders-share-move
Open

fix(dav): allow moving files between subfolders of the same share#64106
Antreesy wants to merge 2 commits into
masterfrom
fix/56727/team-folders-share-move

Conversation

@Antreesy

@Antreesy Antreesy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Group folder storage doesn't implement ISharedStorage, so moves within the same team folder nested structures were rejected as cross-share moves, even if it would be the same structure as in equivalent user folders tree.
  • Compare the source's and target's enclosing shares directly instead.
  • Add unit tests coverage in SharesPluginTest.php

TODO

  • Scenarios confirmation
  • Code+Test sanity check

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- group folder storage doesn't implement ISharedStorage, so moves within the same team folder were rejected as cross-share moves. Compare the source's and target's enclosing shares directly instead.
- add unit tests coverage in SharesPluginTest.php

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the Nextcloud 36 milestone Sep 7, 2026
@Antreesy
Antreesy requested a review from susnux September 7, 2026 15:27
@Antreesy Antreesy self-assigned this Sep 7, 2026
@Antreesy
Antreesy requested a review from a team as a code owner September 7, 2026 15:27
@Antreesy
Antreesy requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team September 7, 2026 15:27
Comment thread apps/dav/lib/Connector/Sabre/SharesPlugin.php Outdated
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>

@provokateurin provokateurin left a comment

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.

I don't think this is a valid change. It allows moving files to a different share, which could lead to different permissions. For example if writing was not allowed by the source share but by any of the target shares, this would be a permission escalation.

I also don't see how this should work for groupfolders, because they are not shares. This fix only addresses it for shares, while the code comment says it is also supposed to work for groupfolders (which would have the same permission escalation issue).

So I'm blocking this for now.

@Antreesy

Copy link
Copy Markdown
Contributor Author

I also don't see how this should work for groupfolders, because they are not shares

It's about shares within groupfolders, not groupfolders themselves.

Current code allows the same for user-owned files shares; groupfolders-owned files shares do not work only because they are not instance of ISharedStorage

Sign up for free to 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.

[Bug]: Folder creation/renaming failed on team folders with share

3 participants