Commit graph

25 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
6b8ad689da
Update grape gem
New version of the gem returns 200 status code on delete with content
instead of 204 so we explicitly set status code to keep existing
behavior

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-07-20 16:33:18 +03:00
Alexander Randa
c7bcebd56e Fix edit button for deploy keys available from other projects 2017-06-20 11:23:13 +00:00
Alexander Randa
3d70eeb5bb Implement ability to update deploy keys 2017-06-02 19:44:36 +03:00
Mark Fletcher
4865a7ab92 Enable creation of deploy keys with write access via the API
* Documentation was incorrectly advertising the missing param
2017-04-05 16:22:28 +10:00
Rémy Coutable
63360adeae
Add requirements: { id: %r{[^/]+} } for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Robert Schilling
e7551214f3 API: Remove DELETE projects/:id/deploy_keys/:key_id/disable 2017-02-20 09:33:42 +01:00
Robert Schilling
01ea65e0e9 Paginate all endpoints that return an array 2017-02-16 15:32:01 +01:00
Robert Schilling
67f5522d2e Remove /projects/:id/keys/.. endpoints 2017-02-07 14:14:15 +01:00
Rémy Coutable
01fa19edfe Merge branch 'grapify-deploy-keys' into 'master'
Grapify all endpoints of the deploy keys API

See merge request !8721
2017-01-24 12:45:09 +00:00
Robert Speicher
60d1dcb83a Merge branch 'fix-users-deleting-public-deployment-keys' into 'security'
Fix users being able to delete instance public deployment keys

See merge request !2049
2017-01-23 13:41:58 -05:00
Robert Schilling
18417c9ee8 Grapify all endpoints of the deploy keys API 2017-01-23 17:06:57 +01:00
Robert Schilling
76bd09326f Use declared_params helper in API 2016-11-14 15:22:06 +01:00
Joshua Welsh
ce4760bbd5
Fixes various errors when adding deploy keys caused by not exiting the control flow.
When adding a deploy key that already exists in the project the existing key would not be returned, resulting in an attempt to create a new one, which in turn caused a 500 error due to an ActiveRecord exception.

When adding a deploy key that exists within another project the key would be joined to the project, but would also attempt to create a new one, which resulted in a 400 error due to the key already existing.

Fixes #22741
Fixes #21754

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-26 12:54:47 +02:00
Z.J. van de Weg
7e47a82899 Namespace EnableDeployKeyService under Projects 2016-08-08 20:59:51 +02:00
Z.J. van de Weg
554e18ab02 Create service for enabling deploy keys 2016-08-05 11:38:17 +02:00
Z.J. van de Weg
460065b743 Move deploy_key tests to deploy_key_spec.rb
Also, fix the failing test in the process
2016-08-04 16:55:20 +02:00
Z.J. van de Weg
2b6bd6a33f Use Grape DSL for deploy keys endpoints
Also a minor clean up of the post endpoint
2016-08-03 21:04:14 +02:00
Z.J. van de Weg
da3d3ba89c Endpoints to enable and disable deploy keys
Resolves #20123
2016-08-03 16:00:22 +02:00
Alejandro Rodríguez
0480317433 Change returns for nexts to please rubocop (behaviour is the same) 2016-07-20 13:39:34 -04:00
Alejandro Rodríguez
818ad89ea5 Add /deploy_keys API to retrieve all deploy keys regardless of project affiliation
Also, in favour of consistency, deprecate `/projects/:id/keys/...` routes in favour of
`/projects/:id/deploy_keys/...`
2016-07-20 13:39:19 -04:00
jubianchi
998cd3cb63 Improve error reporting on users API
* users (#6878, #3526, #4209): Validation error messages are now exposed through 400 responses, 409 response are sent in case of duplicate email or username
* MRs (#5335): 409 responses are sent in case of duplicate merge request (source/target branches), 422 responses are sent when submiting MR fo/from unrelated forks
* issues
* labels
* projects
2014-09-16 01:25:24 +02:00
skv
a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets
d636ad49bf API: set gitlab-ci service for project 2013-10-29 16:39:46 +02:00
Dmitriy Zaporozhets
73f780d640 API: Protect project deploy keys from unauthorized access 2013-09-30 16:47:26 +03:00
Dmitriy Zaporozhets
b05600f28b Split Project api on several parts: deploy_keys, hooks, snippets etc 2013-06-06 12:37:51 +03:00