summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-09-02 08:16:27 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-09-02 08:16:27 +0200
commitc86cac6a2b2c269df41f4133e8f918cbb8aca28a (patch)
treeee00d15a5b0811ef1494b31ca192f7b796d5694f
parent310084cc25b63ce05b208a426d54e34a2790a6b4 (diff)
downloadnextcloud-server-c86cac6a2b2c269df41f4133e8f918cbb8aca28a.tar.gz
nextcloud-server-c86cac6a2b2c269df41f4133e8f918cbb8aca28a.zip
use config.php value instead of version string
-rw-r--r--settings/controller/checksetupcontroller.php2
-rw-r--r--tests/settings/controller/CheckSetupControllerTest.php28
2 files changed, 29 insertions, 1 deletions
diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php
index 33f94fe4238..ca4eb255f6b 100644
--- a/settings/controller/checksetupcontroller.php
+++ b/settings/controller/checksetupcontroller.php
@@ -143,7 +143,7 @@ class CheckSetupController extends Controller {
}
$features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
- if(OC_Util::getEditionString() !== '') {
+ if(!$this->config->getSystemValue('appstoreenabled', true)) {
$features = (string)$this->l10n->t('Federated Cloud Sharing');
}
diff --git a/tests/settings/controller/CheckSetupControllerTest.php b/tests/settings/controller/CheckSetupControllerTest.php
index 414b1b91e17..2a8a6548ebb 100644
--- a/tests/settings/controller/CheckSetupControllerTest.php
+++ b/tests/settings/controller/CheckSetupControllerTest.php
@@ -384,6 +384,11 @@ class CheckSetupControllerTest extends TestCase {
}
public function testIsUsedTlsLibOutdatedWithOlderOpenSsl() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('appstoreenabled', true)
+ ->will($this->returnValue(true));
$this->checkSetupController
->expects($this->once())
->method('getCurlVersion')
@@ -391,7 +396,25 @@ class CheckSetupControllerTest extends TestCase {
$this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as installing and updating apps via the app store or Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated'));
}
+ public function testIsUsedTlsLibOutdatedWithOlderOpenSslAndWithoutAppstore() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('appstoreenabled', true)
+ ->will($this->returnValue(false));
+ $this->checkSetupController
+ ->expects($this->once())
+ ->method('getCurlVersion')
+ ->will($this->returnValue(['ssl_version' => 'OpenSSL/1.0.1c']));
+ $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated'));
+ }
+
public function testIsUsedTlsLibOutdatedWithOlderOpenSsl1() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('appstoreenabled', true)
+ ->will($this->returnValue(true));
$this->checkSetupController
->expects($this->once())
->method('getCurlVersion')
@@ -416,6 +439,11 @@ class CheckSetupControllerTest extends TestCase {
}
public function testIsBuggyNss400() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('appstoreenabled', true)
+ ->will($this->returnValue(true));
$this->checkSetupController
->expects($this->once())
->method('getCurlVersion')