Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Load preview URL for download-disabled shares #2484

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Sep 8, 2024

This was possible on Nextcloud 30 and previous due to a "bug": The download permission was simply not rejected for public shares, just a hide flag was set on the public share.

Now the permissions are correctly set, so loading a preview is not possible. The work-around is to allow previews when the correct header is set.

…ions

This is not only a possibility for public shares but also for internal shares,
the current code only "checked" public shares.
This adds the same logic we use in the files app. Probably something to move to
`@nextcloud/sharing` but for the moment lets just reuse here.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
This was possible on Nextcloud 30 and previous due to a "bug":
The `download` permission was simply not rejected for public shares,
just a `hide` flag was set on the public share.

Now the permissions are correctly set, so loading a preview is not possible.
The work-around is to allow previews when the correct header is set.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added bug Something isn't working 2. developing Work in progress labels Sep 8, 2024
@skjnldsv skjnldsv force-pushed the fix/hide-download-correctly branch 2 times, most recently from 8f0dfcc to 4263b72 Compare September 15, 2024 09:27
Base automatically changed from fix/hide-download-correctly to master September 15, 2024 10:56
An error occurred while trying to automatically change base from fix/hide-download-correctly to master September 15, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant