From b034fd35f715705a96b899acea24f15ff81863c3 Mon Sep 17 00:00:00 2001 From: nfebe Date: Sun, 18 Jan 2026 18:12:13 +0100 Subject: [PATCH 1/2] fix(sharing): hide external sharing section when link sharing disabled Only show the external sharing section when link sharing is enabled or when federation is enabled and not configured to show as internal. When external sharing is hidden, simplify the section label from "Internal shares" to "Shares". Signed-off-by: nfebe --- apps/files_sharing/lib/Listener/LoadSidebarListener.php | 5 +++-- apps/files_sharing/src/views/SharingTab.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/lib/Listener/LoadSidebarListener.php b/apps/files_sharing/lib/Listener/LoadSidebarListener.php index 935f88ae753da..f7f281aae6821 100644 --- a/apps/files_sharing/lib/Listener/LoadSidebarListener.php +++ b/apps/files_sharing/lib/Listener/LoadSidebarListener.php @@ -43,8 +43,9 @@ public function handle(Event $event): void { $showFederatedToTrustedAsInternal = $gsConfig->isGlobalScaleEnabled() || $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_TO_TRUSTED_AS_INTERNAL); $showFederatedAsInternal = ($gsConfig->isGlobalScaleEnabled() && $gsConfig->onlyInternalFederation()) || $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_AS_INTERNAL); - $showExternalSharing = $appConfig->getValueBool('files_sharing', 'outgoing_server2server_share_enabled', true) - || $appConfig->getValueBool('core', 'shareapi_allow_links', true); + $showExternalSharing = $appConfig->getValueBool('core', 'shareapi_allow_links', true) + || ($appConfig->getValueBool('files_sharing', 'outgoing_server2server_share_enabled', true) + && !$showFederatedAsInternal); $this->initialState->provideInitialState('showFederatedSharesAsInternal', $showFederatedAsInternal); $this->initialState->provideInitialState('showFederatedSharesToTrustedServersAsInternal', $showFederatedToTrustedAsInternal); diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index e3af8e39b28e1..2c0327863309a 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -29,7 +29,7 @@
-

{{ t('files_sharing', 'Internal shares') }}

+

{{ config.showExternalSharing ? t('files_sharing', 'Internal shares') : t('files_sharing', 'Shares') }}