diff options
author | Tom Needham <needham.thomas@gmail.com> | 2012-12-12 18:06:07 +0000 |
---|---|---|
committer | Tom Needham <needham.thomas@gmail.com> | 2012-12-12 18:06:07 +0000 |
commit | 3cc34055368114d81e722adea03a2118e78d2aac (patch) | |
tree | 67c491904a4af641c9b89238cae76e3803a2bccd /lib/ocs/cloud.php | |
parent | 2a4b554ca67ba55c75bbff75777285e550dca84f (diff) | |
download | nextcloud-server-3cc34055368114d81e722adea03a2118e78d2aac.tar.gz nextcloud-server-3cc34055368114d81e722adea03a2118e78d2aac.zip |
API: Remove old code. Move remaining methods to OC_OCS_Result.
Diffstat (limited to 'lib/ocs/cloud.php')
-rw-r--r-- | lib/ocs/cloud.php | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/lib/ocs/cloud.php b/lib/ocs/cloud.php index 720cc0ade39..b5cfbc295e8 100644 --- a/lib/ocs/cloud.php +++ b/lib/ocs/cloud.php @@ -17,7 +17,6 @@ class OC_OCS_Cloud { } public static function getUserQuota($parameters){ - OC_Util::checkLoggedIn(); $user = OC_User::getUser(); if(OC_Group::inGroup($user, 'admin') or ($user==$parameters['user'])) { @@ -41,44 +40,25 @@ class OC_OCS_Cloud { return new OC_OCS_Result($xml); }else{ - return 300; + return new OC_OCS_Result(null, 300); } }else{ - return 300; - } - } - - public static function setUserQuota($parameters){ - OC_Util::checkLoggedIn(); - $user = OC_User::getUser(); - if(OC_Group::inGroup($user, 'admin')) { - - // todo - // not yet implemented - // add logic here - error_log('OCS call: user:'.$parameters['user'].' quota:'.$parameters['quota']); - - $xml=array(); - return $xml; - }else{ - return 300; + return new OC_OCS_Result(null, 300); } } public static function getUserPublickey($parameters){ - OC_Util::checkLoggedIn(); if(OC_User::userExists($parameters['user'])){ // calculate the disc space // TODO - return array(); + return new OC_OCS_Result(array()); }else{ - return 300; + return new OC_OCS_Result(null, 300); } } public static function getUserPrivatekey($parameters){ - OC_Util::checkLoggedIn(); $user = OC_User::getUser(); if(OC_Group::inGroup($user, 'admin') or ($user==$parameters['user'])) { @@ -87,10 +67,10 @@ class OC_OCS_Cloud { $txt='this is the private key of '.$parameters['user']; echo($txt); }else{ - echo self::generateXml('', 'fail', 300, 'User does not exist'); + return new OC_OCS_Result(null, 300, 'User does not exist'); } }else{ - echo self::generateXml('', 'fail', 300, 'You don´t have permission to access this ressource.'); + return new OC_OCS_Result('null', 300, 'You don´t have permission to access this ressource.'); } } } |