Commit Graph

21 Commits

Author SHA1 Message Date
Stan Hu 46a6edc731 Remove N+1 queries with /projects/:project_id/{access_requests,members} API endpoints
We can simplify the code quite a bit and improve performance by using
grape-entity merge fields:

https://github.com/ruby-grape/grape-entity/tree/v0.6.0#merge-fields

Relates to #42030
2018-01-30 21:46:09 -08:00
Mark Fletcher 062f5b7126 Fix error on empty query for Members API 2018-01-21 16:36:55 +00:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Rémy Coutable bf69e6291d Ensure user has a unique username otherwise `user10` would match `user1`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling 0394055112 API: Return 400 for all validation erros in the mebers API 2017-02-24 20:13:27 +01:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Jarka Kadlecova 88d610c60e Add member: Always return 409 when a member exists 2017-02-10 15:53:01 +01:00
Rémy Coutable 9c560b5cdf
Replace many :project with :empty_projects in API specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-17 11:41:27 -05:00
Nick Thomas d211011698 Make access request specs explicitly enable or disable access requests as required 2016-11-11 15:45:47 +00:00
Valery Sizov 168197cd5a Fix project member access levels 2016-10-21 12:57:53 +03:00
Rémy Coutable 84b7dd763b Use Grape DSL to document methods and their params
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-05 11:20:27 +02:00
Rémy Coutable c054254f1e Better assertion in API members specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-16 17:18:27 +02:00
Rémy Coutable d8dd1c1940 Ensure invitees are not returned in Members API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-16 17:18:26 +02:00
Sean McGivern 396f85e438 Add expiration date to group memberships 2016-08-18 21:09:17 +01:00
Rémy Coutable 7c1b33b48f Restore back-compatibility for current members API endpoints
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-10 19:07:05 +02:00
Rémy Coutable 29850364ec New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group &
Project.
New API documentation for the AccessRequests endpoints.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-10 19:07:05 +02:00