summaryrefslogtreecommitdiffstats
path: root/ocs/routes.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-09-13 15:27:44 +0000
committerTom Needham <needham.thomas@gmail.com>2012-09-13 15:27:44 +0000
commit0c55ca1d0a04a1c4cae2665458cdb7fd1bc3d80e (patch)
tree6b033724c8d51b855e90e3ff26e7bc549f96ee73 /ocs/routes.php
parenta8c82440d0f4158151b9f28c6bfc0bbc14aea3e1 (diff)
downloadnextcloud-server-0c55ca1d0a04a1c4cae2665458cdb7fd1bc3d80e.tar.gz
nextcloud-server-0c55ca1d0a04a1c4cae2665458cdb7fd1bc3d80e.zip
API: Add required auth level to OCS routes, move some routes to provisioning_api app
Diffstat (limited to 'ocs/routes.php')
-rw-r--r--ocs/routes.php22
1 files changed, 9 insertions, 13 deletions
diff --git a/ocs/routes.php b/ocs/routes.php
index 696b17ca23b..6b01abe31f2 100644
--- a/ocs/routes.php
+++ b/ocs/routes.php
@@ -6,22 +6,18 @@
*/
// Config
-OC_API::register('get', '/config', array('OC_OCS_Config', 'apiConfig'), 'ocs');
+OC_API::register('get', '/config', array('OC_OCS_Config', 'apiConfig'), 'ocs', OC_API::GUEST_AUTH);
// Person
-OC_API::register('post', '/person/check', array('OC_OCS_Person', 'check'), 'ocs');
+OC_API::register('post', '/person/check', array('OC_OCS_Person', 'check'), 'ocs', OC_API::GUEST_AUTH);
// Activity
-OC_API::register('get', '/activity', array('OC_OCS_Activity', 'activityGet'), 'ocs');
+OC_API::register('get', '/activity', array('OC_OCS_Activity', 'activityGet'), 'ocs', OC_API::USER_AUTH);
// Privatedata
-OC_API::register('get', '/privatedata/getattribute', array('OC_OCS_Privatedata', 'get'), 'ocs', array('app' => '', 'key' => ''));
-OC_API::register('get', '/privatedata/getattribute/{app}', array('OC_OCS_Privatedata', 'get'), 'ocs', array('key' => ''));
-OC_API::register('get', '/privatedata/getattribute/{app}/{key}', array('OC_OCS_Privatedata', 'get'), 'ocs');
-OC_API::register('post', '/privatedata/setattribute/{app}/{key}', array('OC_OCS_Privatedata', 'set'), 'ocs');
-OC_API::register('post', '/privatedata/deleteattribute/{app}/{key}', array('OC_OCS_Privatedata', 'delete'), 'ocs');
+OC_API::register('get', '/privatedata/getattribute', array('OC_OCS_Privatedata', 'get'), 'ocs', OC_API::USER_AUTH, array('app' => '', 'key' => ''));
+OC_API::register('get', '/privatedata/getattribute/{app}', array('OC_OCS_Privatedata', 'get'), 'ocs', OC_API::USER_AUTH, array('key' => ''));
+OC_API::register('get', '/privatedata/getattribute/{app}/{key}', array('OC_OCS_Privatedata', 'get'), 'ocs', OC_API::USER_AUTH);
+OC_API::register('post', '/privatedata/setattribute/{app}/{key}', array('OC_OCS_Privatedata', 'set'), 'ocs', OC_API::USER_AUTH);
+OC_API::register('post', '/privatedata/deleteattribute/{app}/{key}', array('OC_OCS_Privatedata', 'delete'), 'ocs', OC_API::USER_AUTH);
// Cloud
-OC_API::register('get', '/cloud/system/webapps', array('OC_OCS_Cloud', 'getSystemWebApps'), 'ocs');
-OC_API::register('get', '/cloud/user/{user}/quota', array('OC_OCS_Cloud', 'getUserQuota'), 'ocs');
-OC_API::register('post', '/cloud/user/{user}/quota', array('OC_OCS_Cloud', 'setUserQuota'), 'ocs');
-OC_API::register('get', '/cloud/user/{user}/publickey', array('OC_OCS_Cloud', 'getUserPublicKey'), 'ocs');
-OC_API::register('get', '/cloud/user/{user}/privatekey', array('OC_OCS_Cloud', 'getUserPrivateKey'), 'ocs');
+OC_API::register('get', '/cloud/system/webapps', array('OC_OCS_Cloud', 'getSystemWebApps'), 'ocs', OC_API::ADMIN_AUTH);
?>