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

Commits on Sep 8, 2024

  1. fix: Hide download action when file does not provide download permiss…

    …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]>
    susnux committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    3324f2c View commit details
    Browse the repository at this point in the history
  2. chore: Compile assets

    Signed-off-by: Ferdinand Thiessen <[email protected]>
    susnux committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    b6722ac View commit details
    Browse the repository at this point in the history
  3. fix: Load preview URL for download-disabled shares

    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 committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    ad15a91 View commit details
    Browse the repository at this point in the history