summaryrefslogtreecommitdiff
path: root/spec/requests/api
Commit message (Collapse)AuthorAgeFilesLines
* API: Version informationapi-versionRobert Schilling2016-10-121-0/+27
|
* 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.
* | | | | Allowing ">" to be used for Milestone models's title and storing the value ↵Makoto Scott-Hinkle2016-09-291-0/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in db as unescaped. Updating test value for milestone title Adding API test for title with reserved HTML characters. Updating changelog Adding the MR number for fixing bug #22452. removing duplicate line Updating MR number.
* | | | Merge branch 'issue_22382' into 'master' Rémy Coutable2016-09-291-3/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose project share expiration_date field on API closes #22382 See merge request !6484
| * | | | Expose project share expiration_date field on APIissue_22382Felipe Artur2016-09-281-3/+6
| | |_|/ | |/| |
* | | | Merge branch '22367-add-pipeline-id-build' into 'master' Rémy Coutable2016-09-291-0/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose pipeline data in builds API Exposes pipeline data in builds API, as suggested by #22367. The fields exposed were 'id', 'status', 'ref', and 'sha'. Closes #22367 See merge request !6502
| * | | | expose pipeline data in builds APIGuilherme Salazar2016-09-281-0/+27
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add pipeline ref, sha, and status to the build API response add tests of build API (pipeline data) change API documentation for builds API log change to builds API in CHANGELOG CHANGELOG: add reference to pull request and contributor's name
* | | | Handle LFS token creation and retrieval in the same method, and in the same ↵lfs-ssh-authorization-fixPatricio Cano2016-09-281-2/+2
|/ / / | | | | | | | | | | | | | | | Redis connection. Reset expiry time of token, if token is retrieved again before it expires.
* | | Add extra check for api users specDmitriy Zaporozhets2016-09-271-0/+1
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Improvements to user organization field feature after code reviewDmitriy Zaporozhets2016-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | * Add newline to user organization spec according to test guide * Remove unnecessary comments from user organization database migration Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Add User#organization to users apiDmitriy Zaporozhets2016-09-271-0/+7
|/ / | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | API: Return 404 when trying to fork to unaccessible namespaceRémy Coutable2016-09-221-2/+2
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'and-you-get-awards' into 'master' Rémy Coutable2016-09-211-1/+53
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And Snippets get awards ## What does this MR do? Makes snippets more awesome, by making them awardables ## Why was this MR needed? Because Snippets were left behind. ## What are the relevant issue numbers? Closes #17878 See merge request !4456
| * Fix tests for Snippets toggling awardsZ.J. van de Weg2016-09-191-2/+2
| | | | | | | | Also incorporate feedback
| * API support for Award Emoji on SnippetsZ.J. van de Weg2016-09-191-5/+50
| |