Skip to content

fix(share): allow viewing files in shares with download disabled - #9581

Merged
mejo- merged 3 commits into
mainfrom
fix/share_can_see_content
Nov 10, 2026
Merged

mejo- merged 3 commits into
mainfrom
fix/share_can_see_content

Conversation

@mejo-

@mejo- mejo- commented Nov 9, 2026

Copy link
Copy Markdown
Member

Text refused to open files from shares with the download permission disabled, including the folder description (Readme.md) of shared folders and attachments in such files.

Use IShare::canSeeContent() to decide whether Text may show a file and its attachments. Copying a file into the attachment folder still requires the download permission, as WebDAV COPY and MOVE do on the server.

Migrate the share e2e tests from Cypress to Playwright and test both values of the admin setting.

Fixes: #7023

Assisted-by: ClaudeCode:claude-opus-5-5

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo- mejo- self-assigned this Nov 9, 2026
@mejo- mejo- added bug Something isn't working 3. to review feature: sharing labels Nov 9, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 9, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 9, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Nov 9, 2026
@mejo-

mejo- commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

Comment thread lib/Service/AttachmentService.php Resolved
@mejo-
mejo- requested a review from blizzz November 10, 2026 10:19
@mejo-
mejo- force-pushed the fix/share_can_see_content branch from 5e099dd to 6ea244f Compare November 10, 2026 11:31
Comment thread lib/Service/AttachmentService.php Resolved
@mejo-
mejo- force-pushed the fix/share_can_see_content branch from 6ea244f to d59d1de Compare November 10, 2026 14:07
@mejo-
mejo- requested a review from blizzz November 10, 2026 14:09
Text refused to open files from shares with the download permission
disabled, including the folder description (Readme.md) of shared
folders and attachments in such files.

Use `IShare::canSeeContent()` to decide whether Text may show a file
and its attachments. Copying a file into the attachment folder still
requires the download permission, as WebDAV COPY and MOVE do on the
server.

Migrate the share e2e tests from Cypress to Playwright and test both
values of the admin setting.

Fixes: #7023

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
…scription

Only return the content of the folder description in the rich
workspace PROPFIND properties if `canSeeContent()` allows viewing the
Readme.md, as the editor already does. Otherwise the folder
description preview showed content that the editor then refused to
open.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
Files opened through a link share are resolved via the share owner's
storage, so checking the file's storage never found the share. Check
the link share itself when building the file context, and recognize
any shared storage, including the one used by public WebDAV.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the fix/share_can_see_content branch from d59d1de to b57a2cb Compare November 10, 2026 14:59
@mejo-
mejo- merged commit a8718bc into main Nov 10, 2026
68 of 70 checks passed
@mejo-
mejo- deleted the fix/share_can_see_content branch November 10, 2026 15:14
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Nov 10, 2026
@4jNsY6fCVqZv

Copy link
Copy Markdown

@mejo- Thank you so much for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug Something isn't working feature: sharing

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Share without "download" permission blocks readme.md

4 participants