mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
feat: hide "External Shares" section if no external shares can be created
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d86975e9fa
commit
de286709f8
3 changed files with 11 additions and 1 deletions
|
|
@ -43,8 +43,11 @@ class LoadSidebarListener implements IEventListener {
|
|||
$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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in a new issue