Skip to content

[stable33] Fix "allow view without download" option not being handled#1387

Merged
danxuliu merged 3 commits intostable33from
backport/1384/stable33
Mar 19, 2026
Merged

[stable33] Fix "allow view without download" option not being handled#1387
danxuliu merged 3 commits intostable33from
backport/1384/stable33

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot bot commented Mar 19, 2026

Backport of #1384

@nextcloud/initial-state was already an implicit dependency, but now it
is made explicit to use the functions it provides in the PDF viewer code.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Since Nextcloud 32 it is possible to enable a general sharing option to
allow viewing a document when it is internally shared without download
permission. In that case the share attributes still mark the file as not
downloadable, even if in practice it is (otherwise it would not be
possible to view it locally), so the setting needs to be explicitly
taken into account.

The setting does not seem to be exposed from the backend, so it is added
to the initial state of the PDF viewer to be able to know it.

As being able to view a file without download permissions is essentially
the same concept as hiding the download in a public share the same
limitations are applied too (not allowing to print nor to select).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the backport/1384/stable33 branch from 6e90e8e to 18e4314 Compare March 19, 2026 10:12
@danxuliu
Copy link
Copy Markdown
Member

/compile /

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@danxuliu danxuliu marked this pull request as ready for review March 19, 2026 10:41
Copy link
Copy Markdown
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@danxuliu danxuliu enabled auto-merge March 19, 2026 10:45
@danxuliu danxuliu merged commit e907182 into stable33 Mar 19, 2026
42 of 43 checks passed
@danxuliu danxuliu deleted the backport/1384/stable33 branch March 19, 2026 11:03
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.

2 participants