Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions apps/files_sharing/lib/Listener/LoadSidebarListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ 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);

$this->initialState->provideInitialState('showFederatedSharesAsInternal', $showFederatedAsInternal);
$this->initialState->provideInitialState('showFederatedSharesToTrustedServersAsInternal', $showFederatedToTrustedAsInternal);
$this->initialState->provideInitialState('showExternalSharing', $showExternalSharing);
}
}
7 changes: 7 additions & 0 deletions apps/files_sharing/src/services/ConfigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,11 @@ export default class Config {
get showFederatedSharesToTrustedServersAsInternal(): boolean {
return loadState('files_sharing', 'showFederatedSharesToTrustedServersAsInternal', false)
}

/**
* Show the external share ui
*/
get showExternalSharing(): boolean {
return loadState('files_sharing', 'showExternalSharing', true)
}
}
2 changes: 1 addition & 1 deletion apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<SharingEntryInternal :file-info="fileInfo" />
</section>

<section>
<section v-if="config.showExternalSharing">
<div class="section-header">
<h4>{{ t('files_sharing', 'External shares') }}</h4>
<NcPopover popup-role="dialog">
Expand Down
Loading