Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/integration/features/provisioning-v1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,6 @@ Feature: provisioning
And assure user "user0" is disabled
And As an "user0"
When sending "GET" to "/index.php/apps/files"
Then the OCS status code should be "999"
And the HTTP status code should be "200"
Then the OCS status code should be "997"
And the HTTP status code should be "401"

2 changes: 2 additions & 0 deletions ocs/v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
OC_Response::setStatus(405);
} catch (\OC\OCS\Exception $ex) {
OC_API::respond($ex->getResult(), OC_API::requestedFormat());
} catch (\OC\User\LoginException $e) {
OC_API::respond(new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class OC_OCS_Result has been deprecated with message: Since 9.1.0 use \OC\OCS\Result

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but old obsolete api OC_API.
So I can't pass in \OC\OCS\Result

} catch (\Exception $e) {
OC_API::setContentType();
OC_OCS::notFound();
Expand Down