[stable16] Show share settings only if incoming federated shares are allowed (#15926)
[stable16] Show share settings only if incoming federated shares are allowed
This commit is contained in:
commit
9dfe777fc8
|
@ -63,7 +63,6 @@ class Personal implements ISettings {
|
|||
$url = 'https://nextcloud.com/sharing#' . $cloudID;
|
||||
|
||||
$parameters = [
|
||||
'outgoingServer2serverShareEnabled' => $this->federatedShareProvider->isOutgoingServer2serverShareEnabled(),
|
||||
'message_with_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID, see %s', [$url]),
|
||||
'message_without_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID', [$cloudID]),
|
||||
'logoPath' => $this->defaults->getLogo(),
|
||||
|
@ -80,11 +79,12 @@ class Personal implements ISettings {
|
|||
* @since 9.1
|
||||
*/
|
||||
public function getSection() {
|
||||
if (!$this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
|
||||
return null;
|
||||
}
|
||||
if ($this->federatedShareProvider->isIncomingServer2serverShareEnabled() ||
|
||||
$this->federatedShareProvider->isIncomingServer2serverGroupShareEnabled()) {
|
||||
return 'sharing';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int whether the form should be rather on the top or bottom of
|
||||
|
|
|
@ -5,7 +5,6 @@ script('federatedfilesharing', 'settings-personal');
|
|||
style('federatedfilesharing', 'settings-personal');
|
||||
?>
|
||||
|
||||
<?php if ($_['outgoingServer2serverShareEnabled']): ?>
|
||||
<div id="fileSharingSettings" class="section">
|
||||
<h2 data-anchor-name="federated-cloud"><?php p($l->t('Federated Cloud')); ?></h2>
|
||||
<a target="_blank" rel="noreferrer noopener" class="icon-info svg"
|
||||
|
@ -58,4 +57,4 @@ style('federatedfilesharing', 'settings-personal');
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue