Browse Source
don't add server automatically to trusted server
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/2178/head
Bjoern Schiessle
9 years ago
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
2 changed files with
2 additions and
2 deletions
-
apps/federation/lib/TrustedServers.php
-
apps/federation/tests/TrustedServersTest.php
|
|
|
@ -137,7 +137,7 @@ class TrustedServers { |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
public function getAutoAddServers() { |
|
|
|
$value = $this->config->getAppValue('federation', 'autoAddServers', '1'); |
|
|
|
$value = $this->config->getAppValue('federation', 'autoAddServers', '0'); |
|
|
|
return $value === '1'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -172,7 +172,7 @@ class TrustedServersTest extends TestCase { |
|
|
|
*/ |
|
|
|
public function testGetAutoAddServers($status, $expected) { |
|
|
|
$this->config->expects($this->once())->method('getAppValue') |
|
|
|
->with('federation', 'autoAddServers', '1')->willReturn($status); |
|
|
|
->with('federation', 'autoAddServers', '0')->willReturn($status); |
|
|
|
|
|
|
|
$this->assertSame($expected, |
|
|
|
$this->trustedServers->getAutoAddServers() |
|
|
|
|