Commit Graph

1787 Commits

Author SHA1 Message Date
Douwe Maan 6d37fe952b Merge branch 'jej-fix-missing-access-check-on-issues' into 'security'
Fix missing access checks on issue lookup using IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

⚠️ - Potentially untested
💣 - No test coverage
🚥 - Test coverage of some sort exists (a test failed when error raised)
🚦 - Test coverage of return value (a test failed when nil used)
 - Permissions check tested

- [x]  app/controllers/projects/branches_controller.rb:39
  - `before_action :authorize_push_code!` helpes limit/prevent exploitation. Always checks for reporter access so fine with
    confidential issues, issues only visible to team, etc.
- [x] 🚥 app/models/cycle_analytics/summary.rb:9 [`.count`]
- [x]  app/controllers/projects/todos_controller.rb:19

- [x] Potential double render in app/controllers/projects/todos_controller.rb

- https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#cedccb227af9bfdf88802767cb58d43c2b977439_24_24

See merge request !2030
2016-11-28 21:25:46 -03:00
Douwe Maan 742cee756b Merge branch 'jej-22869' into 'security'
Fix information disclosure in `Projects::BlobController#update`

It was possible to discover private project names by modifying `from_merge_request`parameter in `Projects::BlobController#update`. This fixes that.

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- Tests
  - [x] Added for this feature/bug
  - [ ] 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] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

https://gitlab.com/gitlab-org/gitlab-ce/issues/22869

See merge request !2023
2016-11-28 21:25:18 -03:00
Adam Niedzielski d9a2093e7e Prevent error when submitting a merge request and pipeline is not defined 2016-11-28 12:03:59 +01:00
Robert Speicher 8fad76b6ef Merge branch '22253-move-lfshelper-methods-somewhere-else-than-app-helpers' into 'master'
This moves methods from `LfsHelper` to a new `LfsRequest` concern and
introduces a new `WorkhorseRequest` concern.

Closes #22253

See merge request !7623
2016-11-28 05:33:35 +00:00
Douwe Maan d8f7523368 Merge branch 'events-cache-invalidation' into 'master'
Remove caching of events data

This MR removes the caching of events data as this was deemed unnecessary while increasing load on the database. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037 and 5371da341e for more information.

See merge request !6578
2016-11-28 03:34:12 +00:00
Douwe Maan b3e1561fde Merge branch 'backport-commands-params' into 'master'
Backport Note#commands_changes from EE

One small thing from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/870 that was missed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7604.

/cc @rdavila

See merge request !7730
2016-11-24 09:02:01 +00:00
Douwe Maan ba5e98bb70 Backport Note#commands_changes from EE 2016-11-24 14:32:32 +08:00
Rémy Coutable 4b3c1e56ae
Move LfsHelper to a new LfsRequest concern
Also create a new WorkhorseRequest concern

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-23 17:28:11 +01:00
Yorick Peterse 5371da341e
Remove event caching code
Flushing the events cache worked by updating a recent number of rows in
the "events" table. This has the result that on PostgreSQL a lot of dead
tuples are produced on a regular basis. This in turn means that
PostgreSQL will spend considerable amounts of time vacuuming this table.
This in turn can lead to an increase of database load.

For GitLab.com we measured the impact of not using events caching and
found no measurable increase in response timings. Meanwhile not flushing
the events cache lead to the "events" table having no more dead tuples
as now rows are only inserted into this table.

As a result of this we are hereby removing events caching as it does not
appear to help and only increases database load.

For more information see the following comment:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
2016-11-23 14:17:07 +01:00
Valery Sizov 3789cfe056 Add a starting date to milestones 2016-11-23 13:41:04 +02:00
Kamil Trzciński c4376b2f88 Merge branch '24804-wrong-render-index-should-be-render-show-in-projects-pipelinessettingscontroller-update' into 'master'
Resolve "Wrong `render 'index'`, should be `render 'show'` in `Projects::PipelinesSettingsController#update`"

Closes #24804

See merge request !7665
2016-11-22 17:12:01 +00:00
Rémy Coutable 42855f116a Fix wrong template rendered when CI/CD settings aren't update successfully
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-22 16:18:05 +01:00
Adam Niedzielski d7bd8f128e Do not use MergeRequest#commits in define_pipelines_vars
MergeRequest#commits requires merge_request_diff to be present.
This is not the case when creating a new merge request.
2016-11-22 15:21:01 +01:00
Jacob Schatz d17f506811 Merge branch '23449-cycle-analytics-2-frontend' into 'master'
Cycle analytics second iteration frontend

## Are there points in the code the reviewer needs to double check?
Mostly typos and code guidelines.

## Why was this MR needed?
This implements the frontend part of !6859 for #23449

## Screenshots

**Initial view**
![Screen_Shot_2016-11-21_at_5.28.43_PM](/uploads/ff9cfa9c9d6c2da28c24e03e384f89af/Screen_Shot_2016-11-21_at_5.28.43_PM.png)

**Cycle Analytics with data**
![Screen_Shot_2016-11-21_at_2.09.24_PM](/uploads/18d9786c090bdd554cf786c879543302/Screen_Shot_2016-11-21_at_2.09.24_PM.png)

**User doesn't have access for a stage**
![Screen_Shot_2016-11-21_at_2.11.01_PM](/uploads/d1ea76a63f2de2224954b5f40038c488/Screen_Shot_2016-11-21_at_2.11.01_PM.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] 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)
- [ ] 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 #23449

See merge request !7366
2016-11-22 00:16:13 +00:00
Sean McGivern 7a5e653fde Merge branch 'hide-empty-merge-request-diffs' into 'master'
Fix errors happening when source branch of merge request is removed and then restored

See merge request !7568
2016-11-21 19:23:22 +00:00
Alfredo Sumaran 2748a01a3a Use stage description form endpoint response 2016-11-21 13:57:10 -05:00
Alfredo Sumaran 06fd2879ee Provide stage legend on server response 2016-11-21 13:57:09 -05:00
Adam Niedzielski 35615bc331 Hide box with CI status when there are no changes in merge request 2016-11-21 18:13:53 +01:00
Adam Niedzielski aebca55d7a Return valid response in Projects::MergeRequestsController#ci_status when diff_head_sha is nil 2016-11-21 18:13:53 +01:00
James Lopez a3331eee91 Updated code based on feedback 2016-11-21 17:29:07 +01:00
James Lopez 7a63021ab3 rename method 2016-11-21 17:19:18 +01:00
James Lopez dde8fba524 Adds a flag to reflect whether or not there is data in cycle analytics 2016-11-21 17:19:18 +01:00
Sean McGivern 80eaed1651 Merge branch 'fix/cycle-analytics-permissions' into 'master'
Added permissions per stage to cycle analytics endpoint

See merge request !7613
2016-11-21 16:07:27 +00:00
James Lopez 9b69168858 refactored a couple of things based on feedback 2016-11-21 14:09:26 +01:00
Sean McGivern 671c6d7d57 Merge branch 'ee-870-backport' into 'master'
Backport some changes done from Time Tracking feature in EE.

See merge request !7604
2016-11-21 12:54:55 +00:00
Adam Niedzielski e22514fd4c Hide empty merge request diffs when comparing versions 2016-11-21 13:26:26 +01:00
James Lopez 0fd397bba1 Added permissions per stage to cycle analytics endpoint 2016-11-21 10:49:05 +01:00
Ruben Davila 452d1d0824 Backport some changes done from Time Tracking feature in EE. 2016-11-18 21:19:04 -05:00
Kamil Trzcinski 8d0018444d Merge remote-tracking branch 'origin/master' into 22539-display-folders 2016-11-18 20:20:30 +01:00
Kamil Trzciński ffc5fc6a38 Merge branch 'zj-slash-commands-mattermost' into 'master'
Slash command for mattermost

Closes  #22540

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- 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)


See merge request !7438
2016-11-18 18:06:36 +00:00
Douwe Maan 2343b83098 Merge branch 'feature/cycle-analytics-events' into 'master'
Cycle Analytics: Events per stage

Adds list of events to each stage:

- Issue: list of issues created in the last XX days, that have been labeled or added to a milestone.
- Plan: list of commits that reference for the fist time an issue from the last stage.
- Code: list of MR created in this stage
- Test: List of unique builds triggered by the commits.
- Review: List of MR merged
- Staging: List of deployed builds
- Production: list of issues with the time from idea to production

Fixes #23449 

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- 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)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !6859
2016-11-18 13:50:50 +00:00
Yorick Peterse 058287ea0f Merge branch 'optimize-mr-index' into 'master'
More aggressively preload on merge request and issue index pages

See merge request !7564
2016-11-18 13:49:20 +00:00
Douwe Maan 7c5af3ea92 More aggressively preload on merge request and issue index pages 2016-11-18 14:21:43 +02:00
James Lopez f5b792e22e refactored updater and updated specs 2016-11-18 13:00:38 +01:00
James Lopez cb353d655b added new build updater, specs and refactored allowed_ids 2016-11-18 12:05:29 +01:00
Z.J. van de Weg 778b5a5a04 Merge remote-tracking branch 'origin/master' into zj-slash-commands-mattermost 2016-11-17 21:56:38 +01:00
Kamil Trzcinski 53271b486d Make chat authorization to work [ci skip] 2016-11-17 21:34:23 +01:00
Sean McGivern 0b21a71aeb Merge branch 'fix-singin-redirect-for-fork-new' into 'master'
Fixing the issue of visiting a project fork url giving 500 error when not signed…

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24302

See merge request !7392
2016-11-17 19:35:30 +00:00
Douglas Barbosa Alexandre b3249bc28f Use @project as default on ToggleSubscriptionAction concern 2016-11-17 15:10:13 -02:00
Douglas Barbosa Alexandre 4a29fde577 Allow users to subscribe to group labels at project-level 2016-11-17 15:10:13 -02:00
Douglas Barbosa Alexandre 7fcd469e3e Add subscribable_project to ToggleSubscriptionAction concern 2016-11-17 15:10:13 -02:00
James Lopez d5b673da79 more refactoring and added some auth checks 2016-11-17 18:00:37 +01:00
James Lopez 37a3505019 fix integration spec 2016-11-17 15:00:01 +01:00
James Lopez ed39d61d74 refactor events facade so it uses separate classes and refactor query stuff 2016-11-17 13:22:27 +01:00
Sean McGivern 657d470f44 Merge branch '24010-Add-named-anchors-for-diffs-in-the-commit-page' into 'master'
Adds hash anchors to diff_files to make possible linking exact file in commit

Closes #24010

See merge request !7298
2016-11-17 10:14:55 +00:00
James Lopez cf2dcf043c Refactor all query config stuff into separate classes and added specs 2016-11-17 08:22:59 +01:00
James Lopez cbc9f0cd1a fix issue with commits and also updated routes 2016-11-17 08:22:59 +01:00
James Lopez 633ddc9ed9 fix authorization of builds and added relevant spec 2016-11-17 08:22:59 +01:00
James Lopez ca6da6ea30 Renamed pipeline column and fixed permissions for builds in events controller 2016-11-17 08:22:58 +01:00
James Lopez 81d0146c4c WIP - refactoring URL builder and events presenter into serializers 2016-11-17 08:22:58 +01:00