-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(files_sharing): Hide download should not prevent download #50897
base: master
Are you sure you want to change the base?
Conversation
Hide download is meant to hide the download button from the UI not enforce the `download:false` attribute. This commit also modifies the advanced options to only show "Allow download and sync" on public shares. Signed-off-by: nfebe <[email protected]>
@@ -169,7 +169,7 @@ | |||
@update:checked="queueUpdate('hideDownload')"> | |||
{{ t('files_sharing', 'Hide download') }} | |||
</NcCheckboxRadioSwitch> | |||
<NcCheckboxRadioSwitch v-else | |||
<NcCheckboxRadioSwitch v-if="isPublicShare" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is internal share not public share
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a way to users to undo, the effects of the bug introduced by merging hideDownload
and download
permissions.
Looking at the backend, it is the same control, so I am not sure why there distinction is there and it is needed internally however maybe we can leave it for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that apps in the public page used the hideDownload
element to know if they should hide the download or not. That element was also removed when the public page was moved to Vue, so the value should be added back somehow. For example, with $this->initialState->provideInitialState('hideDownload', $share->getHideDownload());
in DefaultPublicShareTemplateProvider.php
similarly to what was done with the sharingToken
value during the migration to Vue. Otherwise even if the download is hidden the apps in the public page would not know it.
Additionally it would be nice if something like isDownloadHidden()
or something like that was added to @nextcloud/sharing
. However this could be done at a later point, it would not be a must to restore the previous behaviour.
Edit: oh, and the Download
button should also be hidden from the public share page :-) That was done in the past but lost with the Vue migration
Hide download is meant to hide the download button from the UI not enforce the
download:false
attribute.This commit also modifies the advanced options to only show "Allow download and sync" on public shares.
Resolves : #48954