Commit Graph

4293 Commits

Author SHA1 Message Date
Rémy Coutable 2706550a96 Merge branch '25031-do-not-raise-error-in-autocomplete' into 'master'
Do not raise error in AutocompleteController#users when not authorized

Closes #25031

See merge request !7817
2016-11-30 11:23:31 +00:00
Semyon Pupkov f5e8337c7b Do not raise error in AutocompleteController#users when not authorized
https://gitlab.com/gitlab-org/gitlab-ce/issues/25031
2016-11-30 10:09:14 +05:00
Grzegorz Bizon a49e9949c6 Rename `MergeRequest#pipeline` to `head_pipeline` 2016-11-29 14:12:49 +01:00
Sean McGivern d8eee8ed73 Merge branch '24880-configurable-plaintext-emails' into 'master'
Add setting to enable/disable HTML emails

Closes #24880

See merge request !7749
2016-11-29 12:05:23 +00:00
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
Ruben Davila b62e2bedbf Add new configuration setting to enable/disable HTML emails.
This new global setting will allow admins to specify if HTML emails should be sent or not,
this is basically useful when system administrators want to save some disk space by avoiding
emails in HTML format and using only the Plain Text version.
2016-11-28 17:00:03 -05:00
Sean McGivern 29d8684274 Merge branch '25026-authenticate-user-for-new-snippet' into 'master'
Ensure user is authenticated to create a new snippet

Closes #25026

See merge request !7786
2016-11-28 20:14:12 +00:00
Rémy Coutable beedd40ef7
Ensure user is authenticated to create a new snippet
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-28 16:57:49 +01:00
Adam Niedzielski d9a2093e7e Prevent error when submitting a merge request and pipeline is not defined 2016-11-28 12:03:59 +01:00
Rémy Coutable bcc030240c Merge branch 'fix-dead-help-link' into 'master'
Fix a broken link and avoid potential creation of future broken links on the help page.

See merge request !7582
2016-11-28 09:01:08 +00: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
Douwe Maan a7a9db803b Merge branch 'dz-allow-nested-group-routing' into 'master'
Add nested groups support to the routing

## What does this MR do?

It allows routing with `/` in namespace name 

## Why was this MR needed?

For nested groups feature(https://gitlab.com/gitlab-org/gitlab-ce/issues/2772). We need URI like `/group/subgroup/project` be routed correctly


## 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
  - [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 !7459
2016-11-24 04:31:54 +00: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
Dmitriy Zaporozhets 6683fdcfb0
Add nested groups support to the routing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-11-23 14:08:36 +02: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 3632f7e4e5 Merge branch 'hot-fix-define-pipeline-vars' into 'master'
Do not use MergeRequest#commits in define_pipelines_vars

## What does this MR do?

`MergeRequest#commits` requires merge_request_diff to be present.
This is not the case when creating a new merge request.

## What are the relevant issue numbers?

Fix up for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7568

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24798

See merge request !7664
2016-11-22 16:32:55 +00:00
Sean McGivern 45d69bf120 Merge branch '24576_cant_stop_impersonating' into 'master'
Allow admins to stop impersonating users without e-mail addresses

Closes #24576

See merge request !7550
2016-11-22 16:26:34 +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
David Wagner c4ded595cc Fix broken external links in help/index.html
An external link was recently added but was broken because
'https://gitlab.com/help/' was prepended to every link in the page.

Since no link in the main help readme begins with "help" and since doing
so wouldn't make sense, the substitution conditionaly prepending "help"
can be simplified and reused.

Signed-off-by: David Wagner <david@marvid.fr>
2016-11-20 20:15:08 +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
Phil Hughes 17ac0fd53d Improved Ruby code in autocomplete user search 2016-11-18 16:10:48 +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
Rémy Coutable e252ee5bbf Merge branch 'namespace-validation' into 'master'
Check all namespaces on validation of new username.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24519 and https://gitlab.com/gitlab-org/gitlab-ce/issues/24580

See merge request !7537
2016-11-18 09:54:16 +00:00