Commit graph

33 commits

Author SHA1 Message Date
skv
a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets
9d79d6e152
Make sure private_token for API is a string
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-08 18:49:38 +02:00
Dmitriy Zaporozhets
03dba1fd42 Merge pull request #5344 from amacarthur/thread-variable-fix
Fixing unsafe use of Thread.current variable :current_user
2013-10-16 23:30:44 -07:00
Nihad Abbasov
12420a2256 refactor by_username_or_id 2013-10-16 22:31:46 +05:00
Nihad Abbasov
e09cc195a7 fix variable name 2013-10-16 22:28:39 +05:00
Angus MacArthur
aefe2e952f Fixing unsafe use of Thread.current variable :current_user 2013-10-16 01:20:53 -04:00
Dmitriy Zaporozhets
836104b41a Merge pull request #5213 from bladealslayer/feature/user_api_extended
Extended User API to expose admin and can_create_group for user creation...
2013-09-29 23:03:46 -07:00
Dmitriy Zaporozhets
726fa6c76a Respect authorization in Repository API
* dont allow protect/unprotect branches for users without master permissions
* dont allow access to Repository api for guests
2013-09-29 16:04:57 +03:00
Boyan Tabakov
479631aafc Extended User API to expose admin and can_create_group for user creation/updating.
Also, is_admin and can_create_group are exposed in the user information.
Fixed attributes_for_keys to process properly keys with boolean values (since false.present? is false).
2013-09-29 11:47:29 +03:00
Izaak Alpert
7a56075efa Some of the requested updates, rebase on master
Change-Id: I305266fe9acbbb5136adeeb52e7e4e1d6629a30a
2013-09-09 12:04:38 -04:00
Izaak Alpert
e86e881832 API: admin users can sudo commands as other users
-Specifying a header of SUDO or adding a :sudo with either user id, or username of the user will set the current_user to be that user if your identifying private_token/PRIVATE_TOKEN is an administrator token
2013-09-09 12:04:38 -04:00
Angus MacArthur
ea5a006f27 Additon of apis for fork administration.
Added ability to add and remove the forked from/to relatioinship
between existing repos.
2013-07-08 17:34:00 -04:00
Dmitriy Zaporozhets
634cbd7138 Refactor API classes. So api classes like Gitlab::Issues become API::Issues 2013-05-14 15:33:31 +03:00
Sebastian Ziebell
7499f65014 API: extracted helper method to validate required parameters, code clean up
Added a helper method to check if required parameters are given in an API call. Can be used
to return a `400 Bad Request` return code if a required attribute is missing.
Code clean up and fixed tests.
2013-02-27 17:50:30 +01:00
Sebastian Ziebell
6fc3263e15 API: extracted helper method to provide 400 bad request error with description
Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of
the missing attribute is used to show which one was missing from the request. It is used to
give an appropriate message in the json response.
2013-02-13 15:48:52 +01:00
Dmitriy Zaporozhets
439d03bbed Fix namespace api autocomplete 2012-12-12 12:54:28 +02:00
Dmitriy Zaporozhets
c50ec72b52 Deprecate code for Project. Use title and path 2012-11-23 21:11:09 +03:00
Valeriy Sizov
e7608cd6f9 API: private token via header 2012-10-02 18:43:35 +03:00
Valeriy Sizov
2e1c3c52bc #1606 Fixes 2012-10-02 18:08:04 +03:00
Valeriy Sizov
e9c356092b #1606 API private token via the header 2012-10-02 18:02:21 +03:00
Valeriy Sizov
825081174a #1585 Api for user creation: base implementation 2012-10-02 12:46:01 +03:00
Dmitriy Zaporozhets
10d3a30b25 APi for commits. Better api docs 2012-09-21 13:22:30 +03:00
Alex Denisov
b896880eb4 Method name changed 2012-09-16 20:08:57 +03:00
Alex Denisov
549c4c2202 API attributes refactored 2012-09-16 19:51:04 +03:00
Alex Denisov
a065557208 Common errors method added 2012-09-10 13:49:00 +03:00
Alex Denisov
915dac0055 Error throwing moved to api_helper 2012-09-10 10:41:46 +03:00
randx
b565f33472 Auth for API 2012-09-10 09:06:11 +03:00
Nihad Abbasov
76e4d94d43 add pagination to API 2012-09-03 04:46:29 -07:00
Nihad Abbasov
cb32e0320a return 404 if project not found 2012-07-25 05:24:28 -07:00
Nihad Abbasov
1b95c8bff3 API: ability to get project by id 2012-07-25 02:18:30 -07:00
Nihad Abbasov
0f604e62fb refactor projects API 2012-07-06 06:36:43 -07:00
Nihad Abbasov
1d2c981860 return errors in json format 2012-06-29 03:52:20 -07:00
Nihad Abbasov
4ad91d3c11 add users API 2012-06-28 03:43:41 -07:00