mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(lookup-server): do not upload data by default
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
a9c3b722c0
commit
7dbafce16f
5 changed files with 6 additions and 6 deletions
|
|
@ -1085,8 +1085,8 @@ class FederatedShareProvider implements IShareProvider {
|
|||
if ($this->gsConfig->isGlobalScaleEnabled()) {
|
||||
return false;
|
||||
}
|
||||
$result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes');
|
||||
return ($result === 'yes');
|
||||
$result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no');
|
||||
return $result === 'yes';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ class FederatedShareProviderTest extends \Test\TestCase {
|
|||
$this->gsConfig->expects($this->once())->method('isGlobalScaleEnabled')
|
||||
->willReturn($gsEnabled);
|
||||
$this->config->expects($this->any())->method('getAppValue')
|
||||
->with('files_sharing', 'lookupServerUploadEnabled', 'yes')
|
||||
->with('files_sharing', 'lookupServerUploadEnabled', 'no')
|
||||
->willReturn($isEnabled);
|
||||
|
||||
$this->assertSame($expected,
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class RetryJob extends Job {
|
|||
protected function shouldRemoveBackgroundJob(): bool {
|
||||
return $this->config->getSystemValueBool('has_internet_connection', true) === false ||
|
||||
$this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') === '' ||
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') !== 'yes' ||
|
||||
$this->retries >= 5;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class UpdateLookupServer {
|
|||
*/
|
||||
private function shouldUpdateLookupServer(): bool {
|
||||
return $this->config->getSystemValueBool('has_internet_connection', true) === true &&
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' &&
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') === 'yes' &&
|
||||
$this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ class VerifyUserData extends Job {
|
|||
|
||||
protected function verifyViaLookupServer(array $argument, string $dataType): bool {
|
||||
if (empty($this->lookupServerUrl) ||
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'no') !== 'yes' ||
|
||||
$this->config->getSystemValue('has_internet_connection', true) === false) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue