mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 07:08:34 -04:00
fix(files_sharing): do not show download button if hide-download is enabled
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
11594df799
commit
a799d8dccf
1 changed files with 2 additions and 2 deletions
|
|
@ -145,7 +145,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
|
|||
|
||||
// Create the header action menu
|
||||
$headerActions = [];
|
||||
if ($view !== 'public-file-drop') {
|
||||
if ($view !== 'public-file-drop' && !$share->getHideDownload()) {
|
||||
// The download URL is used for the "download" header action as well as in some cases for the direct link
|
||||
$downloadUrl = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.downloadShare', [
|
||||
'token' => $token,
|
||||
|
|
@ -156,7 +156,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
|
|||
$headerActions[] = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $downloadUrl, 0, (string)$shareNode->getSize());
|
||||
|
||||
// If remote sharing is enabled also add the remote share action to the menu
|
||||
if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled() && !$share->getHideDownload()) {
|
||||
if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
|
||||
$headerActions[] = new ExternalShareMenuAction(
|
||||
// TRANSLATORS The placeholder refers to the software product name as in 'Add to your Nextcloud'
|
||||
$this->l10n->t('Add to your %s', [$this->defaults->getProductName()]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue