summaryrefslogtreecommitdiff
path: root/spec/requests/api
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix wrong endpoint in api/users documentation, fix same typo in spec ↵Airat Shigapov2016-10-211-3/+3
| | | | | | | | describe blocks
* | Fix project member access levelsfix_project_member_access_levelsValery Sizov2016-10-211-0/+11
| |
* | Make label API spec independent of orderDouwe Maan2016-10-201-2/+1
|/
* List all available labels to the project on the labels APIDouglas Barbosa Alexandre2016-10-191-3/+9
|
* Add support to group labels on issues board APIDouglas Barbosa Alexandre2016-10-191-8/+17
|
* Merge branch 'grapify-commit-statuses-api' into 'master' Rémy Coutable2016-10-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Grapify the commit status API ## What does this MR do? Add the Grape-DSL to the commit status API. ## What are the relevant issue numbers? Related to #22928 See merge request !6879
| * Grapify the commit status APIgrapify-commit-statuses-apiRobert Schilling2016-10-191-2/+2
| |
* | Merge branch 'fix-system-hook-api' into 'master' Rémy Coutable2016-10-191-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Fix Sytem hooks delete behavior ## What does this MR do? This corrects the delete API for system hooks. Returning 200 is not the right way indicating a hooks is not found. ## What are the relevant issue numbers? Discussed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6861/diffs#609af00c90e3d5241064d1404e3e018a3235634a_64_62 See merge request !6883
| * | API: Fix Sytem hooks delete behaviorfix-system-hook-apiRobert Schilling2016-10-141-3/+4
| |/
* | Add a be_like_time matcher and use it in specsNick Thomas2016-10-172-3/+3
|/ | | | | | The amount of precision times have in databases is variable, so we need tolerances when comparing in specs. It's better to have the tolerance defined in one place than several.
* Merge branch 'api-version' into 'master' Robert Speicher2016-10-121-0/+27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Version information ## What does this MR do? Adds a new endpoint to retrieve the version information. ## Why was this MR needed? Clients can now use this information to enable/disable certain API features depending on the version. ## What are the relevant issue numbers? Closes #22608, https://gitlab.com/gitlab-org/gitlab-ce/issues/23148 See merge request !6822
| * API: Version informationapi-versionRobert Schilling2016-10-121-0/+27
| |
* | Merge branch '17541-move-licenses-api-endpoint-to-templates-licenses' into ↵Rémy Coutable2016-10-122-164/+176
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Resolve "Move `/licenses` api endpoint to `/templates/licenses`" ## What does this MR do? It moves the `/licenses`, `/gitignores` and `/gitlab_ci_ymls` API endpoints under the `/templates` namespace ## Why was this MR needed? In EE we now have somewhat ambiguous API endpoints. `/license` refers to the EE license while `/licenses` (plural) refers to license templates. @DouweM mentioned that we're adding .gitignore templates in #14106 so it may make sense to add a /templates namespace. Then, move the /license templates endpoint to be underneath, along with .gitignore endpoints. Closes #17541 See merge request !5717
| * Create a new /templates API namespaceThomas Balthazar2016-10-122-164/+176
| | | | | | | | | | | | The /licenses, /gitignores and /gitlab_ci_ymls endpoints are now also available under a new /templates namespace. Old endpoints will be deprecated when GitLab 9.0.0 is released.
* | Merge branch 'user-events-api' into 'master' Robert Speicher2016-10-121-0/+54
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: New /users/:id/events endpoint ## What does this MR do? If add a new `/users/:id/events` endpoint to retrieve a user's contribution events. The events returned are filtered so that only the events for projects that the current user can see are returned (similarly to what we do at the controller level). ## Why was this MR needed? Because it's a nice feature to calculate leaderboards, for instance for #17815. ## What are the relevant issue numbers? Closes #20866. See merge request !6771
| * | Make spec deterministicuser-events-apiRémy Coutable2016-10-111-11/+9
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Addresses Robert's feedbackRémy Coutable2016-10-111-2/+3
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | API: New /users/:id/events endpointRémy Coutable2016-10-101-0/+55
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'speed-up-api-projects-spec' into 'master' Robert Speicher2016-10-121-13/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up specs for GET /projects/:id/events ## What does this MR do? Just groups some expectations into a single `it` block. Reduce this particular tests block time by half. See merge request !6778
| * | | Speed up specs for GET /projects/:id/eventsspeed-up-api-projects-specRémy Coutable2016-10-101-13/+15
| |/ / | | | | | | | | | | | | | | | From 8.15s to 4.55s by grouping expectations Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch '20708-new-branch-is-immediatelly-tagged-as-merged' into 'master' Douwe Maan2016-10-122-7/+13
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes inconsistency regarding tagging immediately as merged once you create a … - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #20708 See merge request !6408
| * | refactors tests because of gitlab-test repository changes20708-new-branch-is-immediatelly-tagged-as-mergedtiagonbotelho2016-10-112-7/+13
| |/
* | Merge branch 'api-fix-project-group-sharing' into 'security'Rémy Coutable2016-10-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Share projects only with groups current_user can access Aims to address the issues here: https://gitlab.com/gitlab-org/gitlab-ce/issues/23004 * Projects can be shared with non-existent groups * Projects can be shared with groups that the current user does not have access to read Concerns: The new implementation of the API endpoint allows projects to be shared with a larger range of groups than can be done via the web UI. The form for sharing a project with a group uses the following API endpoint to index the available groups: https://gitlab.com/gitlab-org/gitlab-ce/blob/494269fc92f61098ee6bd635a0426129ce2c5456/lib/api/groups.rb#L17. The groups indexed in the web form will only be those groups that the user is currently a member of. The new implementation allows projects to be shared with any group that the authenticated user has access to view. This widens the range of groups to those that are public and internal. See merge request !2005 Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Fix api users spec for post request with invalid idDmitriy Zaporozhets2016-10-101-4/+4
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Replace undefined Grape routing code from 400 to 404Dmitriy Zaporozhets2016-10-102-26/+28
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Fix API specs behaviour for invalid routingDmitriy Zaporozhets2016-10-102-20/+37
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Catch any undefined API routing and return 400 Bad RequestDmitriy Zaporozhets2016-10-101-2/+2
|/ | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'ben.boeckel/gitlab-ce-api-visible-projects' into 'master' Rémy Coutable2016-10-071-0/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add visible projects API ## What does this MR do? Add a new `/projects/visible` API endpoint. Originally created by @ben.boeckel in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5970. ## Are there points in the code the reviewer needs to double check? Does the API make sense? ## Why was this MR needed? The `/projects` endpoint only returned projects the user was explicitly a member of. Closes #19361, #3119. See merge request !6681
| * Update API docs and specs for /projects/visibleSean McGivern2016-10-041-2/+21
| |
| * api: add /projects/visible API endpointBen Boeckel2016-10-041-0/+11
| | | | | | | | FIxes #19361, #3119.
* | Add markdown cache columns to the database, but don't use them yetNick Thomas2016-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.
* | Merge branch 'rc-use-grape-dsl-to-document-members-api' into 'master' Robert Speicher2016-10-061-4/+12
|\ \ | | | | | | | | | | | | | | | | | | API: Use Grape DSL to document access requests and members endpoints Part of #21979, depends on gitlab-org/gitlab-ce!6267 and gitlab-org/gitlab-ce!6266. See merge request !6269
| * | Use Grape DSL to document methods and their paramsrc-use-grape-dsl-to-document-members-apiRémy Coutable2016-10-051-4/+12
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'mahcsig/gitlab-ce-17350-multi-file-commit'Rémy Coutable2016-10-061-6/+267
|\ \ \ | | | | | | | | | | | | See !6096.
| * | | multi-file commitMarc Siegfriedt2016-10-051-6/+267
| |/ / | | | | | | | | | | | | | | | add docs and tests - add additional validation allow move without content updated response
* | | Merge branch 'issue-board-api-support' into 'master' Dmitriy Zaporozhets2016-10-061-0/+192
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue Board API support ## What does this MR do? Adds support for Issue Board in the API. ## Are there points in the code the reviewer needs to double check? ~~Double check whether the Issue Board list movement fix is needed.~~ *Moved to a separate issue.* [#22890](https://gitlab.com/gitlab-org/gitlab-ce/issues/22890) ## Why was this MR needed? Currently the API offers partial support to a project's Issue Board indirectly through Labels. This MR adds support for listing, creating, moving and removing board lists. ## Does this MR meet the acceptance criteria? - [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [X] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [X] API support added - Tests - [X] Added for this feature/bug - [X] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if you do - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? [#22195](https://gitlab.com/gitlab-org/gitlab-ce/issues/22195) See merge request !6646
| * | | Added Issue Board API supportAndre Guedes2016-10-051-0/+192
| |/ / | | | | | | | | | - Includes documentation and tests
* | | Merge commit 'dev/security' into 'master'Rémy Coutable2016-10-062-7/+34
|\ \ \ | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * \ \ Merge branch '22435-no-api-state-change-via-rails-session' into 'security' Douwe Maan2016-09-281-6/+33
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: disable rails session auth for non-GET/HEAD requests Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22435 See merge request !1999
| | * | | API: disable rails session auth for non-GET/HEAD requestsNick Thomas2016-09-231-6/+33
| | | | |
| * | | | Enforce the fork_project permission in Projects::CreateServiceNick Thomas2016-09-271-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects::ForkService delegates to this service almost entirely, but needed one small change so it would propagate create errors correctly. CreateService#execute needs significant refactoring; it is now right at the complexity limit set by Rubocop. I avoided doing so in this commit to keep the diff as small as possible. Several tests depend on the insecure behaviour of ForkService, so fi them up at the same time.
* | | | fix group links 404barthc2016-10-051-0/+10
| |/ / |/| |
* | | Invert method's namingRémy Coutable2016-10-031-1/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Improve Members::DestroyServiceRémy Coutable2016-10-031-2/+12
| |/ |/| | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch ↵Robert Speicher2016-10-021-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master' Resolve "`Member.add_user`doesn't detect existing members that have requested access" ## What does this MR do? This merge request handle the case when an access requester is added to a group or project (via the members page or the API). In `Member.add_user`, if an access requester already exists, we simply accept their request (and set the `created_by`, `access_level` and `expires_at` attributes if given). ## Are there points in the code the reviewer needs to double check? I've taken the opportunity to cleanup the whole `{Group,Project}Member.add_user*` methods since it was quite a mess. ## What are the relevant issue numbers? Closes #21983 See merge request !6393
| * | Allow Member.add_user to handle access requestersRémy Coutable2016-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'rc-new-members-request-access-service' into 'master' Robert Speicher2016-10-021-2/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | New `Members::RequestAccessService` Part of #21979. See merge request !6265
| * | | New Members::RequestAccessServiceRémy Coutable2016-09-221-2/+16
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch 'koding-setting-api' into 'master' Robert Speicher2016-09-301-10/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose the Koding application settings in the API ## Why was this MR needed? When saving the GitLab application secrets in Koding, and authorising your admin user to have access to the UI, we want to let Koding enable the integration, and populate the url in GitLab for the user. ## What are the relevant issue numbers? Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22705 See merge request !6555
| * | | | Expose the Koding application settings in the APIkoding-setting-apiDJ Mountney2016-09-291-10/+26
| | | | | | | | | | | | | | | | | | | | This will allow the Koding app to enable the integration itself once is has authorized an admin user using the application secrets.