Merge pull request #1536 from nextcloud/backport-1489-ocs-status-code-when-app-is-disabled

[stable10] Return 404 on v2.php when the app is disabled
This commit is contained in:
Lukas Reschke 2016-09-28 23:02:43 +02:00 committed by GitHub
commit 766abeeae6
2 changed files with 5 additions and 6 deletions

View File

@ -500,7 +500,7 @@ Feature: provisioning
Given As an "admin" Given As an "admin"
And user "user0" exists And user "user0" exists
And As an "user0" And As an "user0"
When sending "GET" to "/index.php/apps/files" When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200" Then the HTTP status code should be "200"
Scenario: Making a web request with a disabled user Scenario: Making a web request with a disabled user
@ -508,7 +508,6 @@ Feature: provisioning
And user "user0" exists And user "user0" exists
And assure user "user0" is disabled And assure user "user0" is disabled
And As an "user0" And As an "user0"
When sending "GET" to "/index.php/apps/files" When sending "GET" to "/cloud/capabilities"
Then the OCS status code should be "999" Then the OCS status code should be "997"
And the HTTP status code should be "200" And the HTTP status code should be "401"

View File

@ -37,7 +37,7 @@ class OC_OCS {
$format = \OC::$server->getRequest()->getParam('format', 'xml'); $format = \OC::$server->getRequest()->getParam('format', 'xml');
$txt='Invalid query, please check the syntax. API specifications are here:' $txt='Invalid query, please check the syntax. API specifications are here:'
.' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n"; .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n";
OC_API::respond(new OC_OCS_Result(null, API::RESPOND_UNKNOWN_ERROR, $txt), $format); OC_API::respond(new OC_OCS_Result(null, API::RESPOND_NOT_FOUND, $txt), $format);
} }
} }