summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'api-dont-allow-blank-mr-titles' into 'master' Sean McGivern2016-12-131-2/+2
|\ | | | | | | | | | | | | 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-2/+2
| |
* | Merge branch 'grapify-service-api' into 'master' Rémy Coutable2016-12-122-65/+572
|\ \ | | | | | | | | | | | | | | | | | | Grapify the service API Related to #22928 See merge request !7970
| * | Grapify the service APIRobert Schilling2016-12-092-65/+572
| | |
* | | Merge branch 'api-fix-group-projects-filter' into 'master' Rémy Coutable2016-12-121-1/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+10
| | | |
* | | | Merge branch 'issue_25030' into 'master' Sean McGivern2016-12-121-8/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | 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-8/+8
| | | |
* | | | Merge branch 'features/api-snippets' into 'master' Sean McGivern2016-12-123-0/+151
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding support for personal snippet endpoint on the API Closes #22042 See merge request !6373
| * | | | API: Endpoint to expose personal snippets as /snippetsGuyzmo2016-12-013-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+6
| | | | | |
* | | | | | Merge branch 'dz-nested-groups' into 'master' Douwe Maan2016-12-091-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add nested groups support on data level ## What does this MR do? - [x] Add `parent_id` field to `Namespace`model. - [x] Create new database table `routes` that keeps information about full path to each group or project - [x] Remove uniq index from `namespaces.path` - [x] Add uniq index on `routes.path` - [x] Fill routes table with path data from namespaces and projects - [x] Change Namespace/Project URL lookup by routes table - [x] Rename related routes (nested groups, projects) when parent path changes This is solely backend preparation. UI, Permissions and API support will be added in separate merge request. ## Are there points in the code the reviewer needs to double check? migrations, Route model, Routable concern Will require downtime. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7121#note_19490281 discussion ## Why was this MR needed? One step further to full nested groups support ## Screenshots (if relevant) No UI changes in this merge request so far ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added~~ - ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~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? https://gitlab.com/gitlab-org/gitlab-ce/issues/2772 See merge request !7121
| * | | | | | Add nested groups support on data leveldz-nested-groupsDmitriy Zaporozhets2016-12-081-1/+1
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add parent_id field to namespaces table to store relation with nested groups * create routes table to keep information about full path of every group and project * project/group lookup by full path from routes table Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | | Merge branch 'public-tags-api' into 'master' 19703-direct-link-pipelines-into-buildsDouwe Maan2016-12-081-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | | Merge branch '24537-reenable-private-token-with-sudo' into 'master' Douwe Maan2016-12-084-16/+23
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-074-17/+23
| | | | | | | |
| * | | | | | | Reenables /user API request to return private-token if user is admin and ↵tiagonbotelho2016-12-072-1/+2
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | requested with sudo
* | | | | | | Grapify the issues APIgrapify-issues-apiRobert Schilling2016-12-072-167/+112
|/ / / / / /
* | | | | | A simpler implementation of finding a merge requestBob Van Landuyt2016-12-061-9/+6
| |_|_|/ / |/| | | | | | | | | | | | | | Following a discussion in !7180
* | | | | Feature: delegate all open discussions to IssueBob Van Landuyt2016-12-051-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a merge request can only be merged when all discussions are resolved. This feature allows to easily delegate those discussions to a new issue, while marking them as resolved in the merge request. The user is presented with a new issue, prepared with mentions of all unresolved discussions, including the first unresolved note of the discussion, time and link to the note. When the issue is created, the discussions in the merge request will get a system note directing the user to the newly created issue.
* | | | | Merge branch 'use-pagination-helper' into 'master' Rémy Coutable2016-12-0516-20/+84
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | Use the pagination helper in the API See merge request !7920
| * | | | Use the pagination helper in the APIuse-pagination-helperRobert Schilling2016-12-0416-20/+84
| | |/ / | |/| |
* | | | Merge branch 'fix/rename-mwbs-to-merge-when-pipeline-succeeds' into 'master' Kamil Trzciński2016-12-051-7/+11
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename MWBS service to Merge When Pipeline Succeeds ## What does this MR do? This MR renames Merge When Build Succeeds feature to Merge When Pipeline Succeeds, because we recently changed the behavior, see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6675. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] All builds are passing ## What are the relevant issue numbers? Closes #23354 See merge request !7135
| * | | Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-309-78/+69
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (110 commits) Rewrite an HTTP link to use HTTPS Edit /spec/features/profiles/preferences_spec.rb to match changes in 084d90ac Add blue back to sub nav active Remove JSX/React eslint plugins. Fix a transient spec failure Adds hoverstates for collapsed Issue/Merge Request sidebar Moved groups above projects Add StackProf to the Gemfile, along with a utility to get a profile for a spec Update Sidekiq-cron to fix compatibility issues with Sidekiq 4.2.1 Add a CHANGELOG entry Alert user when logged in user email is not the same as the invitation Expose timestamp in build entity used by serializer Rename `MergeRequest#pipeline` to `head_pipeline` Remove unnecessary database indexes CE-specific changes gitlab-org/gitlab-ee#1137 Fixing typo & Clarifying Key name fix started_at check fix blob controller spec failure - updated not to use file-path- fix blob controller spec failure Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' ... Conflicts: app/controllers/projects/merge_requests_controller.rb lib/api/merge_requests.rb spec/requests/api/merge_requests_spec.rb
| * \ \ \ Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-2516-391/+420
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (312 commits) Fix bad selection on dropdown menu for tags filter Fixed issue boards scrolling with a lot of lists & issues You can only assign default_branch when editing a project ... Don't convert data which already is the target type Stop supporting Google and Azure as backup strategies renames some of the specs and adds changelog entry Fixed dragging issue moving wrong issue after multiple drags of issue Fixed issue boards issue sorting when dragging issue into list Rephrase some system notes to be compatible with new system note style Add missing JIRA file that redirects to the new location Fix documentation to create the `pg_trm` extension before creating the DB Document that we always use `do...end` for `before` in RSpec Backport Note#commands_changes from EE Log mv_namespace parameters Add default_branch attr to Project API payload in docs. Fix title case to sentence case properly escape username validation error message flash Remove header ids from University docs Add missing documentation. Added test that checks the correct select box is there for the LFS ... ... Conflicts: app/services/system_note_service.rb spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb spec/services/system_note_service_spec.rb
| * | | | | Update some docs to reflect MWPS name changeGrzegorz Bizon2016-11-211-2/+2
| | | | | |
| * | | | | Rename MWBS service to Merge When Pipeline SucceedsGrzegorz Bizon2016-11-211-5/+9
| | | | | |
* | | | | | Merge branch 'api-expose-commiter-details' into 'master' Rémy Coutable2016-12-041-0/+1
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Expose committer details for a commit Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22312 See merge request !7849
| * | | | | API: Expose committer details for a commitapi-expose-commiter-detailsRobert Schilling2016-12-011-0/+1
| | |_|_|/ | |/| | |
* | | | | Allow public access to some Project API endpoints4269-public-apiRémy Coutable2016-12-012-10/+23
|/ / / / | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch 'api-branch-status' into 'master' Rémy Coutable2016-11-301-1/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Expose branch status Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24938 See merge request !7796
| * | | | API: Expose branch statusapi-branch-statusRobert Schilling2016-11-301-1/+5
| | | | |
* | | | | Merge branch 'grapify-files-api' into 'master' Rémy Coutable2016-11-301-93/+60
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the files API Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/22928 See merge request !7806
| * | | | | Grapify the files APIgrapify-files-apiRobert Schilling2016-11-301-93/+60
| |/ / / /
* | | | | Merge branch 'grapify-projects-api' into 'master' Rémy Coutable2016-11-302-337/+267
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Grapify the projects API Related to #22928 See merge request !7456
| * | | | Grapify the projects APIgrapify-projects-apiRobert Schilling2016-11-282-337/+267
| |/ / /
* | | | Rename `MergeRequest#pipeline` to `head_pipeline`fix/rename-merge-request-head-pipelineGrzegorz Bizon2016-11-291-1/+1
| | | |
* | | | Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' Douwe Maan2016-11-282-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace issue access checks with use of IssuableFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Issue lookup with access check Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells). - [x] :vertical_traffic_light: app/finders/notes_finder.rb:15 [`visible_to_user`] - [x] :traffic_light: app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`] - [x] :white_check_mark: app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`] - [x] :white_check_mark: lib/api/issues.rb:112 [`visible_to_user`] - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone - [x] :white_check_mark: lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too? - [x] :white_check_mark: lib/gitlab/search_results.rb:53 [`visible_to_user`] ### Previous discussions - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126 - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87 See merge request !2031
* | | | Merge branch 'zj-fix-label-creation-non-members' into 'security'Douwe Maan2016-11-283-61/+37
|/ / / | | | | | | | | | | | | | | | | | | | | | Fix label creation non members Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416 See merge request !2006
* | | Merge branch 'zj-expose-coverage-pipelines' into 'master' Rémy Coutable2016-11-251-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Expose coverage on GET pipelines/:id Closes gitlab-org/gitlab-ce#24801 See merge request !7670
| * | | Expose coverage on GET pipelines/:idzj-expose-coverage-pipelinesZ.J. van de Weg2016-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | The coverage wasn't exposed yet, now it is but only for detailed requests to save queries on the database.
* | | | Merge branch '22373-reduce-queries-in-api-helpers-find_project' into 'master' Yorick Peterse2016-11-257-12/+28
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | Resolve "Reduce queries in API::Helpers#find_project" See merge request !7714
| * | | API: Introduce `#find_group!` which also check access permission22373-reduce-queries-in-api-helpers-find_projectRémy Coutable2016-11-244-7/+15
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | API: Introduce `#find_project!` which also check access permissionRémy Coutable2016-11-242-8/+11
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | API: Use `#find_project` in API::Triggers and API::ServicesRémy Coutable2016-11-242-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | Make API::Helpers find a project with only one queryRémy Coutable2016-11-241-1/+6
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Don't convert data which already is the target typeapi-no-convertRobert Schilling2016-11-244-4/+4
|/ / /
* | | Merge branch 'api-delete-group-share' into 'master' Rémy Coutable2016-11-231-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | API: Add endpoint to delete a group share Closes #24771 See merge request !7662