From aa3cfd61ab9a4d9d37377b9451b884a3bf24ddcd Mon Sep 17 00:00:00 2001 From: kristian-zendato Date: Mon, 14 Sep 2026 10:55:52 +0000 Subject: [PATCH] fix(sharing): hide external sharing section when link sharing disabled fix(sharing): hide external sharing section when link sharing disabled Signed-off-by: kristian-zendato [skip ci] --- apps/files_sharing/lib/Listener/LoadSidebarListener.php | 5 +++-- 1 file changed, 3 insertions(+), 2 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);