diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 15:10:42 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 20:54:32 +0100 |
commit | cc744740b790a72e2d5c6b07814dadb5b58014fb (patch) | |
tree | 3ce5db818feacccfecb81d98d7ecaa11b7e11336 /apps/provisioning_api/lib/Controller/GroupsController.php | |
parent | 0829fea5e7f9a81a69599c5df7c75b997055e5ba (diff) | |
download | nextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.tar.gz nextcloud-server-cc744740b790a72e2d5c6b07814dadb5b58014fb.zip |
Remove deprecated \OCP\API
Time to remove this forgood now.
Remaining constant moved over
The world is a tiny bit better
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/GroupsController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index d91f5892f05..b031c405046 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -39,6 +39,7 @@ use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCS\OCSNotFoundException; +use OCP\AppFramework\OCSController; use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; @@ -195,7 +196,7 @@ class GroupsController extends AUserData { if ($group !== null) { $isSubadminOfGroup = $this->groupManager->getSubAdmin()->isSubAdminOfGroup($currentUser, $group); } else { - throw new OCSException('The requested group could not be found', \OCP\API::RESPOND_NOT_FOUND); + throw new OCSException('The requested group could not be found', OCSController::RESPOND_NOT_FOUND); } // Check subadmin has access to this group @@ -224,7 +225,7 @@ class GroupsController extends AUserData { return new DataResponse(['users' => $usersDetails]); } - throw new OCSException('User does not have access to specified group', \OCP\API::RESPOND_UNAUTHORISED); + throw new OCSException('User does not have access to specified group', OCSController::RESPOND_UNAUTHORISED); } /** @@ -270,7 +271,7 @@ class GroupsController extends AUserData { throw new OCSException('Not supported by backend', 101); } else { - throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED); + throw new OCSException('', OCSController::RESPOND_UNAUTHORISED); } } |