summaryrefslogtreecommitdiff
path: root/spec/requests
Commit message (Collapse)AuthorAgeFilesLines
* Fix a Grape deprecation, use `#request_method` instead of `#route_method`fix-api-deprecationRémy Coutable2016-12-231-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix state_event parameter to reopen an issuefixes-issues-api-reopenRobert Schilling2016-12-221-0/+7
|
* Ensure nil User-Agent doesn't break the CI APIRémy Coutable2016-12-211-0/+5
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Improve specs for Files API4269-public-files-apiRémy Coutable2016-12-202-34/+51
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow unauthenticated access to Repositories Files API GET endpointsRémy Coutable2016-12-201-11/+26
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '4269-public-repositories-api' into 'master' Sean McGivern2016-12-201-131/+353
|\ | | | | | | | | | | | | Allow Repositories API GET endpoints to be requested anonymously Closes #4269 See merge request !8148
| * Improve specs for Repositories API4269-public-repositories-apiRémy Coutable2016-12-201-113/+223
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Allow Repositories API GET endpoints to be requested anonymouslyRémy Coutable2016-12-191-82/+194
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Spaces around literal hashLin Jen-Shin2016-12-191-2/+2
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/builds/7617209
* | Just set the status rather than calling eventLin Jen-Shin2016-12-191-5/+2
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20239558
* | Define actions in let so that it could be overriddenLin Jen-Shin2016-12-191-10/+13
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091/diffs#note_20236356
* | Delete the project when building the buildLin Jen-Shin2016-12-191-10/+7
| | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222756
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-12-196-22/+60
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-forbidden-for-build-api-for-deleted-project * upstream/master: (333 commits) Fix typo Always use `fixture_file_upload` helper to upload files in tests. Add CHANGELOG Move admin application spinach test to rspec Move admin deploy keys spinach test to rspec Fix rubocop failures Store mattermost_url in settings Improve Mattermost Session specs Ensure the session is destroyed Improve session tests Setup mattermost session Fix query in Projects::ProjectMembersController to fetch members Improve test for sort dropdown on members page Fix sort dropdown alignment Undo changes on members search button stylesheet Use factories to create project/group membership on specs Remove unused id from shared members sort dropdown Fix sort functionality on project/group members to return invited users Refactor MembersHelper#filter_group_project_member_path Remove unnecessary curly braces from sort dropdown partial ...
| * Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741Rydkin Maxim2016-12-161-1/+1
| |
| * Modify `ApiHelpers` spec to adhere to the Four-Phase test style.Timothy Andrew2016-12-161-0/+12
| | | | | | | | - Use whitespace to separate the setup, expectation and teardown phases.
| * Validate access token scopes in `Gitlab::Auth`Timothy Andrew2016-12-161-1/+1
| | | | | | | | | | | | - This module is used for git-over-http, as well as JWT. - The only valid scope here is `api`, currently.
| * Calls to the API are checked for scope.Timothy Andrew2016-12-162-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the `Oauth2::AccessTokenValidationService` class to `AccessTokenValidationService`, since it is now being used for personal access token validation as well. - Each API endpoint declares the scopes it accepts (if any). Currently, the top level API module declares the `api` scope, and the `Users` API module declares the `read_user` scope (for GET requests). - Move the `find_user_by_private_token` from the API `Helpers` module to the `APIGuard` module, to avoid littering `Helpers` with more auth-related methods to support `find_user_by_private_token`
| * Add an environment slugNick Thomas2016-12-151-0/+17
| |
| * Add Gitlab::Middleware::MultipartJacob Vosmaer2016-12-151-2/+2
| |
* | Give forbidden if project for the build was deletedLin Jen-Shin2016-12-151-0/+19
|/ | | | Closes #25309
* Fix wrong error message expectation in API::Commits spec25651-fix-masterRémy Coutable2016-12-141-1/+1
| | | | | | | This was because the MR was a bit behind master and the error message got updated in the meantime by 79aad815. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'api-cherry-pick' into 'master' Rémy Coutable2016-12-131-0/+70
|\ | | | | | | | | | | | | Adds the ability to cherry pick a commit via the API. Right now it only supports to directly cherry pick a commit and not starting a MR from it. Shall we do that also for the API? Closes #25450 See merge request !8047
| * Make rubocop happyapi-cherry-pickRobert Schilling2016-12-131-1/+1
| |
| * API: Ability to cherry-pick a commitRobert Schilling2016-12-131-0/+70
| |
* | Merge branch '25482-fix-api-sudo' into 'master' Sean McGivern2016-12-132-44/+68
|\ \ | | | | | | | | | | | | | | | | | | API: Memoize the current_user so that the sudo can work properly Closes #25482 See merge request !8017
| * | Be smarter when finding a sudoed user in API::Helpers25482-fix-api-sudoRémy Coutable2016-12-131-2/+2
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | API: Memoize the current_user so that the sudo can work properlyRémy Coutable2016-12-122-42/+66
| |/ | | | | | | | | | | | | | | The issue was arising when `#current_user` was called a second time after a user was impersonated: the `User#is_admin?` check would be performed on it and it would fail. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'api-simple-group-project' into 'master' Rémy Coutable2016-12-131-2/+13
|\ \ | | | | | | | | | | | | | | | | | | API: Ability to get group's project in simple representation Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25412 See merge request !8060
| * | API: Ability to get group's project in simple representationapi-simple-group-projectRobert Schilling2016-12-131-2/+13
| | |
* | | Merge branch 'api-dont-allow-blank-mr-titles' into 'master' Sean McGivern2016-12-131-0/+16
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Don't allow blank MR titles in API Closes #25033 See merge request !7848
| * | Don't allow blank MR titles in APIapi-dont-allow-blank-mr-titlesRobert Schilling2016-12-131-0/+16
| |/
* | Merge branch 'grapify-service-api' into 'master' Rémy Coutable2016-12-121-2/+3
|\ \ | | | | | | | | | | | | | | | | | | Grapify the service API Related to #22928 See merge request !7970
| * | Grapify the service APIRobert Schilling2016-12-091-2/+3
| | |
* | | Merge branch 'api-fix-group-projects-filter' into 'master' Rémy Coutable2016-12-121-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | API: Add the project filter to the groups endpoint. Related to #22928. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25420 See merge request !8034
| * | | API: Fix groups filterRobert Schilling2016-12-121-0/+11
| | | |
* | | | Merge branch 'issue_25030' into 'master' Sean McGivern2016-12-121-0/+31
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Allow branch names with dots on API endpoint closes #25030 See merge request !7963
| * | | Allow branch names with dots on API endpointissue_25030Felipe Artur2016-12-081-0/+31
| |/ /
* | | Merge branch 'features/api-snippets' into 'master' Sean McGivern2016-12-121-0/+157
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Adding support for personal snippet endpoint on the API Closes #22042 See merge request !6373
| * | | API: Endpoint to expose personal snippets as /snippetsGuyzmo2016-12-011-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the necessary API for the new /snippets Restful resource added with this commit. Added a new Grape class `Snippets`, as well as a `PersonalSnippet` entity. Issue: #20042 Merge-Request: !6373 Signed-off-by: Guyzmo <guyzmo+gitlab+pub@m0g.net>
* | | | Merge branch 'api-remove-source-branch' into 'master' Rémy Coutable2016-12-091-1/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Ability to remove source branch Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23577 See merge request !7804
| * | | | API: Ability to remove source branchapi-remove-source-branchRobert Schilling2016-12-041-1/+11
| | | | |
* | | | | Merge branch 'public-tags-api' into 'master' 19703-direct-link-pipelines-into-buildsDouwe Maan2016-12-081-7/+48
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow public access to some Tag API endpoints Continuation of #4269. See merge request !7896
| * | | | | Allow public access to some Tag API endpointspublic-tags-apiRémy Coutable2016-12-071-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Merge branch '24537-reenable-private-token-with-sudo' into 'master' Douwe Maan2016-12-082-82/+196
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reenables /user API request to return private-token if user is admin and requested with sudo ## What does this MR do? Reenables the API /users to return `private-token` when sudo is either a parameter or passed as a header and the user is admin. ## Screenshots (if relevant) Without **sudo**: ![Screen_Shot_2016-11-21_at_11.44.49](/uploads/ebecf95dbadaf4a159b80c61c75771d9/Screen_Shot_2016-11-21_at_11.44.49.png) With **sudo**: ![Screen_Shot_2016-11-21_at_11.45.52](/uploads/f25f9ddffcf2b921e9694e5a250191d3/Screen_Shot_2016-11-21_at_11.45.52.png) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) 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 it does - 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 #24537 See merge request !7615
| * | | | | | adds impersonator variable and makes sudo usage overall more clear24537-reenable-private-token-with-sudotiagonbotelho2016-12-072-82/+196
| | | | | | |
* | | | | | | Merge branch 'grapify-issues-api' into 'master' Rémy Coutable2016-12-071-12/+14
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the issues API Related to #22928 See merge request !7968
| * | | | | | Grapify the issues APIgrapify-issues-apiRobert Schilling2016-12-071-12/+14
| | |_|_|/ / | |/| | | |
* | | | | | Merge branch '25209-improve-length-validators' into 'master' Rémy Coutable2016-12-071-3/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use :maximum instead of :within for length validators with a 0..N range Closes #25209 See merge request !7894
| * | | | | Use :maximum instead of :within for length validators with a 0..N range25209-improve-length-validatorsRémy Coutable2016-12-061-3/+1
| |/ / / / | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | Merge branch '23589-open-issue-for-mr' into 'master' Sean McGivern2016-12-061-0/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Create an issue for all unresolved discussions in an MR See merge request !7180