Commit Graph

50 Commits

Author SHA1 Message Date
Thomas Müller caec0c476d Merge pull request #1287 from owncloud/ocs_xml_attributes
API: Treat array keys starting with '@' as XML attributes
2013-01-31 14:39:31 -08:00
Tom Needham b26279546c Simpler method for getting the first char 2013-01-24 10:49:48 +00:00
Tom Needham d89be72972 Remove some whitespace 2013-01-24 10:40:47 +00:00
Tom Needham 02f8c941f4 API: If key begins with '@' treat it as an xml attribute 2013-01-24 10:39:33 +00:00
Thomas Müller 1dac2ba496 Merge pull request #1286 from owncloud/ocs_api
Check that external api methods return instances of OC_OCS_Result
2013-01-24 02:37:40 -08:00
Tom Needham 8f9d3cd01d Code style update 2013-01-23 23:39:29 +00:00
Thomas Müller 0ed635240a Merge pull request #1205 from owncloud/ocs_api
Return 401 headers when trying to access a restricted api call
2013-01-18 05:52:51 -08:00
tomneedham b4954c0c89 Correct spelling of 'Authorization' 2013-01-17 16:30:14 +00:00
Tom Needham 9dc668740a Check that api methods return the correct result type 2013-01-16 21:46:00 +00:00
Tom Needham 358671ac1d Fix incorrect indentation 2013-01-16 20:29:29 +00:00
Tom Needham 098c84a29c Return 401 headers when authentication is required for the api call 2013-01-16 20:27:43 +00:00
Bart Visscher 5bfe4adbaa Whitespace cleanup 2013-01-16 18:09:16 +01:00
Lukas Reschke 31b1a73e1f Check if user is admin - bool
There was no "isAdminUser()" function which returned bool. This is
irritiating as there were a loooooooot of places in the code which
checked this itself with `OC_Group::inGroup($uid, 'admin)` - why not
use a function for this?
(Especially if you consider that we might change the group name in the
future, which would lead to problems then)

Additionally, @Raydiation needed such a method for his AppFramework :)
2013-01-14 19:45:17 +01:00
Tom Needham 6eb194b702 Merge branch 'master' into ocs_api
Conflicts:
	l10n/templates/core.pot
	l10n/templates/files.pot
	l10n/templates/files_encryption.pot
	l10n/templates/files_external.pot
	l10n/templates/files_sharing.pot
	l10n/templates/files_versions.pot
	l10n/templates/lib.pot
	l10n/templates/settings.pot
	l10n/templates/user_ldap.pot
	l10n/templates/user_webdavauth.pot
2012-12-31 15:47:15 +00:00
Tom Needham 39b5199775 API: PUT and DELETE variables are now accessed from the parameters array 2012-12-15 12:37:44 +00:00
Tom Needham 1475ff63dd API: Add check to see if the user is authorised to run the api method 2012-12-12 21:04:23 +00:00
Tom Needham 140141edf2 API: Further tidying, implement OC_OCS_Result object for api results. 2012-12-12 16:50:25 +00:00
Tom Needham 115dbc721d API: Specify the response format using a GET parameter 2012-12-11 22:36:46 +00:00
Tom Needham b079447988 Add API method for sharing a file, currently only via a link. 2012-10-28 11:06:47 +00:00
Tom Needham 3ea01df1cd API: Parse PUT and DELETE variables 2012-09-17 12:08:17 +00:00
Tom Needham 0f07226270 API: Allow admins to access SUBADMIN api methods 2012-09-14 13:41:06 +00:00
Tom Needham a8c82440d0 API: Use http authentication, check the auth level required 2012-09-13 15:18:38 +00:00
Tom Needham fa5dff22a0 API: Require api calls to register the required auth level 2012-09-13 09:41:20 +00:00
Tom Needham 4224eb8831 API: remove OAuth auth check, respond in ocs formatted xml/json 2012-09-04 13:50:56 +00:00
Tom Needham 0d1d2c0b61 Fix class name 2012-08-30 14:01:27 +00:00
Tom Needham 21f8646ffc API: Fix merging of responses. Return 400 error when no OAuth operation sent. 2012-08-03 15:20:01 +00:00
Tom Needham 6047a5fe51 API: Check if the consumer has permissions to access the requested method 2012-08-03 11:56:11 +00:00
Tom Needham a7906d813a Move OAuth classes into lib/oauth 2012-08-03 11:47:05 +00:00
Michael Gapczynski e3d88270cc OAuth server implementation using oauth library 2012-08-02 20:02:31 -04:00
Bart Visscher 4b9200f6f7 Routing: combine all routes into one set 2012-08-02 21:51:31 +02:00
Bart Visscher 37ef522b05 Quick fix for xml encoding arrays 2012-08-02 17:48:09 +02:00
Bart Visscher 7952c6a31c Change access to router object to getter function 2012-08-02 17:47:38 +02:00
Bart Visscher 93daa9e247 API: Complete respond function 2012-08-01 19:48:51 +02:00
Tom Needham c11c2d0fd4 Logout the user at the end of a call to be stateless 2012-08-01 13:39:05 +00:00
Tom Needham 2afe5f9b2b API: add OC_API::checkLoggedIn() 2012-08-01 13:37:00 +00:00
Bart Visscher 7426217e76 Fix /privatedata/getattribute route 2012-07-31 23:26:15 +02:00
Bart Visscher 71918a820f API: set request method for registered urls 2012-07-31 22:34:35 +02:00
Bart Visscher 7a24f0cd8d Make calling ocs/v1.php/config work 2012-07-30 21:19:02 +02:00
Bart Visscher 180bd69dbb Fix OC_API::register 2012-07-30 21:19:02 +02:00
Bart Visscher 0271bfa3b7 Move loading of routes to OC_Router 2012-07-30 21:19:02 +02:00
Tom Needham 2f84a8d746 Merge the responses recursively 2012-07-30 16:04:09 +00:00
Tom Needham c7c16ac49b Improve merging of api responses 2012-07-30 13:39:06 +00:00
Tom Needham b0dc4383e1 Clean code slightly 2012-07-30 12:57:35 +00:00
Tom Needham b563dff10a Record the app that is registering a call to use later with OAuth 2012-07-30 12:56:01 +00:00
Tom Needham 9ffaea480f Add the format parameter inside OC_API 2012-07-30 12:44:34 +00:00
Tom Needham 9072106048 Move OCS methods to lib/ocs/.php 2012-07-30 12:42:18 +00:00
Tom Needham e33174f115 Add core routes and include them in OC_API::call() 2012-07-30 10:56:21 +00:00
Tom Needham 9dbe5f3703 Load routes before calling actions 2012-07-28 21:57:24 +00:00
Tom Needham c375774fca Fix odd indentation issue 2012-07-28 21:50:40 +00:00
Tom Needham 20838bb9c2 Basic structure and functionality of api class 2012-07-28 21:40:11 +00:00