Skip to content
Closed
Changes from all commits
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
Added parameter to disable "Add to your nextcloud" option in public s…
…hares

Added app `files_sharing` parameter `showExternalShareOption` to allow one to hide
"Add to your nextcloud" option in public shares (shown by default). Use
```
occ config:app:set files_sharing showExternalShareOption --value='no'
```
to hide and
```
occ config:app:set files_sharing showExternalShareOption --value='yes'
```
to restore.

Related: #12395
Author-Change-Id: IB#1123210
Signed-off-by: Pawel Boguslawski <[email protected]>
  • Loading branch information
pboguslawski committed Aug 26, 2022
commit fed1e6063e4978cc7a15201ef6a4581be5c76951
3 changes: 2 additions & 1 deletion apps/files_sharing/lib/Controller/ShareController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
* @copyright Copyright (c) 2022 Informatyka Boguslawski sp. z o.o. sp.k., http://www.ib.pl/
*
* @author Arthur Schiwon <[email protected]>
* @author Bjoern Schiessle <[email protected]>
Expand Down Expand Up @@ -572,7 +573,7 @@ public function showShare($path = ''): TemplateResponse {
$responseComposer[] = $download;
}
$responseComposer[] = $directLink;
if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled() && ($this->config->getAppValue('files_sharing', 'showExternalShareOption', 'yes') === 'yes')) {
$responseComposer[] = $externalShare;
}

Expand Down