Commit Graph

26 Commits

Author SHA1 Message Date
Felipe Artur 5e148d4e93 EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Robert Speicher 3e4b45fc21 Only include the user's ID in the time_spent command's update hash
Previously, this would include the entire User record in the update
hash, which was rendered in the response using `to_json`, erroneously
exposing every attribute of that record, including their (now removed)
private token.

Now we only include the user ID, and perform the lookup on-demand.
2017-12-19 15:45:08 -06:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Douwe Maan 025c6eeaa1 Move all API authentication code to APIGuard 2017-10-12 11:13:37 +02:00
Robin Bobbitt 62ef67acc3 Hide read_registry scope when registry is disabled on instance 2017-08-21 18:13:32 -04:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Lin Jen-Shin b7547ade67 Backport to CE for:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2483
2017-08-04 21:45:14 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Rémy Coutable 649382b1c2 Fix the /projects/:id/repository/branches endpoint to handle dots in the branch name when the project full patch contains a `/`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:29:31 +02:00
Felipe Artur c5c9dce270 Add group milestones API endpoint 2017-07-21 11:00:00 -03:00
Timothy Andrew 1b8223dd51 Fix remaining spec failures for !12300.
1. Get the spec for `lib/gitlab/auth.rb` passing.

  - Make the `request` argument to `AccessTokenValidationService` optional -
  `auth.rb` doesn't need to pass in a request.

  - Pass in scopes in the format `[{ name: 'api' }]` rather than `['api']`, which
  is what `AccessTokenValidationService` now expects.

2. Get the spec for `API::V3::Users` passing

2. Get the spec for `AccessTokenValidationService` passing
2017-06-28 07:17:13 +00:00
Timothy Andrew 0ff1d16192 Test OAuth token scope verification in the `API::Users` endpoint 2017-06-28 07:17:13 +00:00
Timothy Andrew 157c05f49d Test `/users` endpoints for the `read_user` scope.
- Test `GET` endpoints to check that the scope is allowed.
- Test `POST` endpoints to check that the scope is disallowed.
- Test both `v3` and `v4` endpoints.
2017-06-28 07:17:13 +00:00
Pawel Chojnacki 969b812433 Add schema matcher for non response objects + use schema to test additional metrics compliance 2017-06-06 19:35:28 +02:00
Bob Van Landuyt 0267b83898 Delegate a single discussion to a new issue
Delegate a discussion in a merge request into a new issue.
The discussion wil be marked as resolved and a system note will be
added linking to the newly created issue.
2017-03-13 08:27:51 +01:00
Timothy Andrew 519bac658a
Fix time tracking endpoints for API v4
- Use issue/merge_request IID instead of ID
- Duplicate the original `TimeTrackingEndpoints` concern (+ specs) for V3, since
  this is a breaking change.
2017-03-07 13:56:00 +05:30
Timothy Andrew dd99622347
API routes referencing a specific issue should use the issue `iid`
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
2017-03-07 13:06:42 +05:30
Robert Schilling 993c3d14d5 Remove shared example for pagination 2017-02-20 15:39:16 +01:00
Ruben Davila 0f3c9355c1 Add some API endpoints for time tracking.
New endpoints are:

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time"

GET  :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
2017-01-18 10:48:16 -06:00
Rémy Coutable 0349e83aa7 Improve specs for Files API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 16:11:10 +01:00
Rémy Coutable c87d93d462
Improve specs for Repositories API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 13:40:41 +01:00
Douglas Barbosa Alexandre 29a91c5bc6 Fix matcher `match_response_schema` 2016-08-17 12:58:59 -03:00
Douglas Barbosa Alexandre e199884478 Projects::BoardsController#show returns a list of board lists 2016-08-17 12:58:58 -03: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
Rémy Coutable 3183092ca9 Add pagination headers to already paginated API resources 2016-01-14 12:10:27 +01:00