Show share settings only if incoming federated shares are allowed
Fixes #15802 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
0229f20fdc
commit
db4e8d67e0
|
@ -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,8 +5,7 @@ script('federatedfilesharing', 'settings-personal');
|
|||
style('federatedfilesharing', 'settings-personal');
|
||||
?>
|
||||
|
||||
<?php if ($_['outgoingServer2serverShareEnabled']): ?>
|
||||
<div id="fileSharingSettings" class="section">
|
||||
<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"
|
||||
title="<?php p($l->t('Open documentation'));?>"
|
||||
|
@ -57,5 +56,5 @@ style('federatedfilesharing', 'settings-personal');
|
|||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue