diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-18 10:30:02 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-18 10:30:02 +0200 |
commit | 3f3f8c2f99e04586424dcbc845e0b73614b9a8bd (patch) | |
tree | 858de94992595ab3dcdf05706df443722d113a09 /apps/provisioning_api/lib | |
parent | 6ce1abfa5c273c657cde1a52fb0fdd3ca450e2c6 (diff) | |
download | nextcloud-server-3f3f8c2f99e04586424dcbc845e0b73614b9a8bd.tar.gz nextcloud-server-3f3f8c2f99e04586424dcbc845e0b73614b9a8bd.zip |
Fix usage of deprecated private constants
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r-- | apps/provisioning_api/lib/apps.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/lib/groups.php | 4 | ||||
-rw-r--r-- | apps/provisioning_api/lib/users.php | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/provisioning_api/lib/apps.php b/apps/provisioning_api/lib/apps.php index c1abb772e41..2bafd06a084 100644 --- a/apps/provisioning_api/lib/apps.php +++ b/apps/provisioning_api/lib/apps.php @@ -60,7 +60,7 @@ class Apps { if(!is_null($info)) { return new OC_OCS_Result(OC_App::getAppInfo($app)); } else { - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The request app was not found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found'); } } diff --git a/apps/provisioning_api/lib/groups.php b/apps/provisioning_api/lib/groups.php index 4a5a69216c4..cd156110635 100644 --- a/apps/provisioning_api/lib/groups.php +++ b/apps/provisioning_api/lib/groups.php @@ -44,14 +44,14 @@ class Groups{ public static function getGroup($parameters){ // Check the group exists if(!OC_Group::groupExists($parameters['groupid'])){ - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The requested group could not be found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The requested group could not be found'); } // Check subadmin has access to this group if(\OC_User::isAdminUser(\OC_User::getUser()) || in_array($parameters['groupid'], \OC_SubAdmin::getSubAdminsGroups(\OC_User::getUser()))){ return new OC_OCS_Result(array('users' => OC_Group::usersInGroup($parameters['groupid']))); } else { - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED, 'User does not have access to specified group'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'User does not have access to specified group'); } } diff --git a/apps/provisioning_api/lib/users.php b/apps/provisioning_api/lib/users.php index 6169ea16f9c..505a141c032 100644 --- a/apps/provisioning_api/lib/users.php +++ b/apps/provisioning_api/lib/users.php @@ -67,7 +67,7 @@ class Users { if(OC_User::isAdminUser(OC_User::getUser()) || OC_SubAdmin::isUserAccessible(OC_User::getUser(), $userId)) { // Check they exist if(!OC_User::userExists($userId)) { - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The requested user could not be found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The requested user could not be found'); } // Show all $return = array( @@ -80,7 +80,7 @@ class Users { } else { // Check they are looking up themselves if(OC_User::getUser() != $userId) { - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED); } // Return some additional information compared to the core route $return = array( @@ -226,7 +226,7 @@ class Users { // Check they're an admin if(!OC_Group::inGroup(OC_User::getUser(), 'admin')){ // This user doesn't have rights to add a user to this group - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED); } // Check if the group exists if(!OC_Group::groupExists($group)){ |