-
t('Use the credentials below to configure your app or device.')); ?>
+
+ t('Use the credentials below to configure your app or device.')); ?>
+ t('For security reasons this password will only be shown once.')); ?>
+
diff --git a/settings/templates/settings.development.notice.php b/settings/templates/settings.development.notice.php
index 4e6bbd8db9..a96661e5de 100644
--- a/settings/templates/settings.development.notice.php
+++ b/settings/templates/settings.development.notice.php
@@ -1,4 +1,6 @@
-
+
',
'',
],
- $l->t('Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.')
+ $l->t('Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.')
)); ?>
diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php
index 7dcbd189cd..9c9214181a 100644
--- a/tests/lib/AppFramework/Controller/OCSControllerTest.php
+++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php
@@ -75,8 +75,8 @@ class OCSControllerTest extends \Test\TestCase {
$expected = "\n" .
"
\n" .
" \n" .
- " failure\n" .
- " 400\n" .
+ " ok\n" .
+ " 100\n" .
" OK\n" .
" \n" .
" \n" .
@@ -86,54 +86,12 @@ class OCSControllerTest extends \Test\TestCase {
" \n" .
"\n";
- $params = [
- 'data' => [
- 'test' => 'hi'
- ],
- 'statuscode' => 400
- ];
+ $params = new DataResponse(['test' => 'hi']);
$out = $controller->buildResponse($params, 'xml')->render();
$this->assertEquals($expected, $out);
}
-
- public function testXMLDataResponse() {
- $controller = new ChildOCSController('app', new Request(
- [],
- $this->getMockBuilder('\OCP\Security\ISecureRandom')
- ->disableOriginalConstructor()
- ->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
- ->disableOriginalConstructor()
- ->getMock()
- ));
- $expected = "\n" .
- "
\n" .
- " \n" .
- " failure\n" .
- " 400\n" .
- " OK\n" .
- " \n" .
- " \n" .
- " \n" .
- " \n" .
- " hi\n" .
- " \n" .
- "\n";
-
- $params = new DataResponse([
- 'data' => [
- 'test' => 'hi'
- ],
- 'statuscode' => 400
- ]);
-
- $out = $controller->buildResponse($params, 'xml')->render();
- $this->assertEquals($expected, $out);
- }
-
-
public function testJSON() {
$controller = new ChildOCSController('app', new Request(
[],
@@ -144,14 +102,9 @@ class OCSControllerTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock()
));
- $expected = '{"ocs":{"meta":{"status":"failure","statuscode":400,"message":"OK",' .
+ $expected = '{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK",' .
'"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}';
- $params = [
- 'data' => [
- 'test' => 'hi'
- ],
- 'statuscode' => 400
- ];
+ $params = new DataResponse(['test' => 'hi']);
$out = $controller->buildResponse($params, 'json')->render();
$this->assertEquals($expected, $out);
diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php
index 6c8b0f4013..d395584d01 100644
--- a/tests/lib/AppFramework/Routing/RoutingTest.php
+++ b/tests/lib/AppFramework/Routing/RoutingTest.php
@@ -24,7 +24,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/folders/{folderId}/open', 'FoldersController', 'open');
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open');
}
public function testSimpleRouteWithMissingVerb()
@@ -42,7 +42,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/folders/{folderId}/open', 'FoldersController', 'open');
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'GET', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open');
}
public function testSimpleRouteWithLowercaseVerb()
@@ -60,7 +60,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open');
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open');
}
public function testSimpleRouteWithRequirements()
@@ -78,7 +78,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', ['something']);
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', ['something']);
}
public function testSimpleRouteWithDefaults()
@@ -97,7 +97,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', [], ['param' => 'foobar']);
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], ['param' => 'foobar']);
}
public function testSimpleRouteWithPostfix()
@@ -115,7 +115,7 @@ class RoutingTest extends \Test\TestCase
]
];
- $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/folders/{folderId}/open', 'FoldersController', 'open', [], [], '_something');
+ $this->assertSimpleOCSRoute($routes, 'folders.open', 'DELETE', '/apps/app1/folders/{folderId}/open', 'FoldersController', 'open', [], [], '_something');
}
/**
@@ -175,7 +175,7 @@ class RoutingTest extends \Test\TestCase
['name' => 'admin_folders#open_current', 'url' => '/folders/{folderId}/open', 'verb' => 'delete']
]];
- $this->assertSimpleOCSRoute($routes, 'admin_folders.open_current', 'DELETE', '/folders/{folderId}/open', 'AdminFoldersController', 'openCurrent');
+ $this->assertSimpleOCSRoute($routes, 'admin_folders.open_current', 'DELETE', '/apps/app1/folders/{folderId}/open', 'AdminFoldersController', 'openCurrent');
}
public function testResource()
diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php
index 643a18cc71..e45a9f0824 100644
--- a/tests/lib/UpdaterTest.php
+++ b/tests/lib/UpdaterTest.php
@@ -137,6 +137,12 @@ class UpdaterTest extends \Test\TestCase {
['8.1.0.0', '8.2.0.0', '8.1', true, true],
['8.2.0.1', '8.2.0.1', '8.1', true, true],
['8.3.0.0', '8.2.0.0', '8.1', true, true],
+
+ // Downgrade of maintenance
+ ['9.0.53.0', '9.0.4.0', '8.1', false, false, 'nextcloud'],
+ // with vendor switch
+ ['9.0.53.0', '9.0.4.0', '8.1', true, false, ''],
+ ['9.0.53.0', '9.0.4.0', '8.1', true, false, 'owncloud'],
];
}
@@ -148,12 +154,17 @@ class UpdaterTest extends \Test\TestCase {
* @param string $allowedVersion
* @param bool $result
* @param bool $debug
+ * @param string $vendor
*/
- public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false) {
+ public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false, $vendor = 'nextcloud') {
$this->config->expects($this->any())
->method('getSystemValue')
->with('debug', false)
->willReturn($debug);
+ $this->config->expects($this->any())
+ ->method('getAppValue')
+ ->with('core', 'vendor', '')
+ ->willReturn($vendor);
$this->assertSame($result, $this->updater->isUpgradePossible($oldVersion, $newVersion, $allowedVersion));
}
diff --git a/version.php b/version.php
index 7787884db7..8cf0822bc7 100644
--- a/version.php
+++ b/version.php
@@ -38,3 +38,5 @@ $OC_Channel = 'git';
// The build number
$OC_Build = '';
+// Vendor of this package
+$vendor = 'nextcloud';