summaryrefslogtreecommitdiff
path: root/spec/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Add profile mode to extend request profilingadd-profile-mode-to-extend-request-profilingQingyu Zhao2019-07-181-19/+44
| | | | | | | Extend the support for "X-Profile-Token: <token>" to have an additional header that defines type of profile we are looking for, like: X-Profile-Mode: execution X-Profile-Mode: memory
* Refactor EnvironmentsController#metrics_dashboard endpointSarah Yasonik2019-07-161-71/+128
|
* Modified spec so a second call to json_response is avoided35757-add-result-to-requestPatrick Derichs2019-07-161-2/+7
|
* Use match_array instead of includePatrick Derichs2019-07-161-1/+1
|
* Add result to MoveService#execute_multiplePatrick Derichs2019-07-161-2/+11
| | | | | | | | It adds a hash response which includes the count, success state and the moved issues itself so the caller has additional information about the result of the process.
* Cleanup usages of `JSON.parse` in specsPeter Leitzen2019-07-1627-97/+57
| | | | Prefer `json_response` where applicable.
* Merge branch 'bvl-rename-routes-after-user-rename' into 'master'Jan Provaznik2019-07-121-1/+1
|\ | | | | | | | | Set the name of a user-namespace to the user name See merge request gitlab-org/gitlab-ce!23272
| * Use namespace#path for building urls in specsBob Van Landuyt2019-07-091-1/+1
| | | | | | | | | | | | Some of the specs were using namespace names instead of paths for building URLS. This would fail since we now build a namespace with a user's name instead of a user's username.
* | Upgrade to Rails 5.2upgrade-rails-5-2-ceHeinrich Lee Yu2019-07-121-2/+3
| | | | | | | | Updates changed method names and fixes spec failures
* | Add endpoint to move multiple issues35757-move-issues-in-boards-pderichsPatrick Derichs2019-07-111-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add specs for new endpoint to move multiple issues. Add changelog entry Just check the first issue for the ability to move / update Add specs for exceeding limits and malformed requests Changed name of shared examples Change title of changelog entry Use %i instead of %w Check permission to update issue on project instead of board Use admin_issue permission to check for issue move ability Changed variable name to avoid shadow issue_params method Rename route to bulk_move Change route definition Check permissions for each issue Combine methods for parameters permit check Remove extra context Change description of context Check param for type Array Add unit tests to MoveService Use before_action for permission check Use set instead of let! Use let's instead of set
* | Resolve Gitaly N+1 for CI/CD environments statusesGrzegorz Bizon2019-07-101-2/+2
| |
* | Add additional test case for Gitaly N+1 for diff filesGrzegorz Bizon2019-07-101-36/+65
| |
* | Add a test for `ci_environments_status` Gitaly N+1Grzegorz Bizon2019-07-101-16/+34
|/
* Add retry:0 for controller specs n+163475-fix-n-1Thong Kuah2019-07-081-1/+1
| | | | As a workaround for https://gitlab.com/gitlab-org/gitlab-ce/issues/64116
* Restore fallback to deployment_platform_clusterThong Kuah2019-07-081-3/+4
| | | | In 12.2 we will remove this fallback.
* Could not address last 5 queriesThong Kuah2019-07-081-1/+4
| | | | Split into followup issue
* Extract deployment_metrics into own objectThong Kuah2019-07-081-48/+26
| | | | | | | We can now share project so that we don't have to load project twice. Also, this extracts non-relevant logic out of Deployment. Update DeploymentsController accordingly
* Add failing test showing N+1Thong Kuah2019-07-081-0/+12
| | | | We have an N+1 problem where N is environments.
* Set default project sort method prior to initial sort on page loadingDavid Palubin2019-07-041-1/+17
|
* Merge branch 'sh-fix-issue-63349' into 'master'Rémy Coutable2019-07-041-0/+47
|\ | | | | | | | | | | | | Make Housekeeping button do a full garbage collection Closes #63349 See merge request gitlab-org/gitlab-ce!30289
| * Make Housekeeping button do a full garbage collectionsh-fix-issue-63349Stan Hu2019-07-031-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the Housekeeping button and API would use the counter of last pushes to determine whether to do a full garbage collection, or whether to do one of the less comprehensive tasks: a full repack, incremental pack, or ref pack. This was confusing behavior, since a project owner might have to click the button dozens of times before a full GC would be initiated. This commit forces a full GC each time this is initiated. Note that the `ExclusiveLease` in `HousekeepingService` prevents users from clicking on the button more than once a day. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63349
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceMarin Jankovski2019-07-0310-120/+294
|\ \ | |/
| * Add username to deploy tokensKrasimir Angelov2019-07-021-0/+20
| | | | | | | | | | | | | | | | | | This new attribute is optional and used when set instead of the default format `gitlab+deploy-token-#{id}`. Empty usernames will be saved as null in the database. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/50228.
| * Revert "Include subgroups in shared_projects"Fabian Schneider2019-07-011-2/+5
| | | | | | | | This reverts commit 4bed2daef935bb4097988e0eff4830fc13a23c37.
| * Merge branch '58583-confidential-mr-branch-backend' into 'master'Rémy Coutable2019-07-012-7/+108
| |\ | | | | | | | | | | | | Support creating an MR/branch on a fork from an issue See merge request gitlab-org/gitlab-ce!29831
| | * Check if user can `update_issue` on projectPatrick Bajao2019-07-011-3/+3
| | | | | | | | | | | | | | | If user can update an issue under the specified confidential issue project, should be able to find the project.
| | * Fix issues when creating system notes58583-confidential-mr-branch-backendPatrick Bajao2019-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `confidential_issue_project_id` is set and the issue is under that project, create the a note about branch creation in that project. If not, do nothing. When creating `new_merge_request` system note, set the project where the MR will be referenced from so it'll be linked to when the MR is created in another project.
| | * Support branch creation from confidential issuePatrick Bajao2019-06-292-6/+107
| | | | | | | | | | | | | | | | | | | | | | | | Accept a `confidential_issue_project_id` param which will be used for the system note target. This also includes some refactoring on the spec to use shared examples.
| * | Merge branch 'id-stale-branches' into 'master'Grzegorz Bizon2019-07-011-0/+23
| |\ \ | | |/ | |/| | | | | | | Add endpoint for fetching diverging commit counts See merge request gitlab-org/gitlab-ce!29802
| | * Add endpoint for fetching diverging commit countsid-stale-branchesIgor Drozdov2019-06-281-0/+23
| | | | | | | | | | | | Extract diverging_commit_counts into a service class
| * | Replace 'JIRA' with 'Jira'Takuya Noguchi2019-06-281-5/+5
| | | | | | | | | | | | | | | | | | https://community.atlassian.com/t5/Jira-questions/Is-it-quot-JIRA-quot-or-quot-Jira-quot/qaq-p/681163 Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
| * | Merge branch 'id-extract-widget-into-different-request' into 'master'Ash McKenzie2019-06-281-0/+60
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Extract MR's widget into a separate request Closes #62723 See merge request gitlab-org/gitlab-ce!29979
| | * | Extract MR's widget into a separate endpointid-extract-widget-into-different-requestIgor Drozdov2019-06-281-0/+60
| | |/ | | | | | | | | | | | | | | | This commits extracts /merge_requests/1.json?serializer=widget Into a separate /merge_requests/1/widget.json endpoint This will allow to use caching for this request
| * | Merge branch 'remove_group_and_instance_clusters_feature_flag' into 'master'Stan Hu2019-06-273-106/+60
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Remove group and instance clusters feature flag Closes #63383 See merge request gitlab-org/gitlab-ce!30124
| | * | Remove instance_clusters feature_flagremove_group_and_instance_clusters_feature_flagThong Kuah2019-06-282-57/+29
| | | | | | | | | | | | | | | | | | | | | | | | Now we have terminals for instance and group clusters we can remove the FF now. Deploying to instance clusters has been working without complaints too.
| | * | Remove group_clusters feature flagThong Kuah2019-06-281-49/+31
| | | | | | | | | | | | | | | | | | | | | | | | Now we have terminals for instance and group clusters we can remove the FF now. Deploying to group clusters has been working without complaints too.
| * | | Merge branch 'sh-avoid-loading-pipeline-status' into 'master'Nick Thomas2019-06-271-0/+13
| |\ \ \ | | |/ / | |/| | | | | | | | | | Avoid loading pipeline status in search results See merge request gitlab-org/gitlab-ce!30111
| | * | Avoid loading pipeline status in search resultsStan Hu2019-06-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the performance of search, since the pipeline status is not displayed. Identified in https://gitlab.com/gitlab-org/gitlab-ce/issues/56627
* | | | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqMarin Jankovski2019-07-035-101/+305
|\ \ \ \ | |/ / / |/| | |
| * | | Merge branch 'osw-persist-tmp-snippet-uploads' into 'master'Marin Jankovski2019-07-022-71/+110
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Persist tmp snippet uploads at users See merge request gitlab/gitlabhq!3138
| | * | | Persist tmp snippet uploadsOswaldo Ferreira2019-06-172-71/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It persist temporary personal snippets under user/:id namespaces temporarily while creating a upload record to track it. If an user gets removed while it's still a tmp upload, it also gets removed. If the tmp upload is sent, the upload gets moved to personal_snippets/:id as before. The upload record also gets updated to the new model type as well.
| * | | | Merge branch 'security-notes-in-private-snippets' into 'master'Marin Jankovski2019-07-022-1/+114
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Ability to write a note in a private snippet See merge request gitlab/gitlabhq!3133
| | * | | | Correctly check permissions when creating snippet notesMarkus Koller2019-06-062-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Snippets::NotesController the noteable was resolved and authorized through the :snippet_id, so by passing a :target_id for a different snippet it was possible to create a note on a snippet where the user would be unauthorized to do so otherwise. This fixes the problem by ignoring the :target_id and :target_type from the request, and using the same noteable for creation and authorization.
| * | | | | Merge branch 'security-prevent-detection-of-merge-request-template-name' ↵Marin Jankovski2019-07-021-29/+81
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Guests can know whether merge request template name exists or not See merge request gitlab/gitlabhq!3117
| | * | | | | Authorize access before serving project templateLuke Duncalfe2019-06-111-29/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if a user was a guest member of a private project, they could access the merge request template as we were not checking permission-levels of the user. When a issue template is asked for, the user must have :read_issue for the project; or :read_merge_request when a merge request template is asked for. We also now rescue_from FileNotFoundError and handle as 404. This is because RepoTemplateFinder can raise a FileNotFoundError exception, which Rails previously handled as a 500. Handling these in a way that is consistent with ActiveRecord::RecordNotFound exceptions, within controllers that inherit from Projects::ApplicationController at least, and returning a 404. https://gitlab.com/gitlab-org/gitlab-ce/issues/54943
* | | | | | | Merge branch 'sh-add-gitaly-ref-caching-search-controller' into 'master'Kamil Trzciński2019-06-271-0/+4
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Enable Gitaly ref caching for SearchController See merge request gitlab-org/gitlab-ce!30105
| * | | | | | Enable Gitaly ref caching for SearchControllersh-add-gitaly-ref-caching-search-controllerStan Hu2019-06-261-0/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we noticed in https://gitlab.com/gitlab-org/gitlab-ce/issues/56627#note_185828742, clicking on the "Issues" tab often requests the same reference in rendering Markdown.
* | | | | | Merge branch '53811-issue-boards-to-core-projects-backend-ce' into 'master'Stan Hu2019-06-272-2/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Move Multiple Issue Boards for Projects to Core See merge request gitlab-org/gitlab-ce!29757
| * | | | | Move Multiple Issue Boards for Projects to Core53811-issue-boards-to-core-projects-backend-ceAlexandru Croitor2019-06-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor code to allow multiple issue boards management for projects in CE
* | | | | | Merge branch '51952-forking-via-webide' into 'master'Nick Thomas2019-06-263-26/+75
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Resolve "500 error when forking via the web IDE button" See merge request gitlab-org/gitlab-ce!29909