Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(files_sharing): do not show download button if hide-download is…
… enabled

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Apr 16, 2025
commit a799d8dccfce5b740b24ea3b753652fff69987c3
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function renderPage(IShare $share, string $token, string $path): Template

// 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,
Expand All @@ -156,7 +156,7 @@ public function renderPage(IShare $share, string $token, string $path): Template
$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()]),
Expand Down