Commit Graph
31492 Commits
Author SHA1 Message Date
Douwe Maan 88889d164d Cancel creating or editing note by hitting Escape 2016-07-04 13:42:42 -04:00
Douwe Maan 021b6aef94 Merge branch '13524-keep-around-commits' into 'master'
Don't garbage collect commits that have related DB records like comments

Closes #13524

Also needed for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4101.

See merge request !5062
2016-07-04 04:40:41 +00:00
Douwe Maan 16ecd7c6dd Document Repository#keep_around 2016-07-04 00:11:33 -04:00
Douwe Maan 3286dd7a1d Don't garbage collect commits that have related DB records like comments 2016-07-04 00:11:33 -04:00
Robert Speicher 4b0bd4f828 Merge branch 'downgrade-redis-3-2-2' into 'master'
Downgrade to Redis 3.2.2 due to massive memory leak with Sidekiq

This affects GitLab 8.8 and 8.9. See:
    
* https://github.com/mperham/sidekiq/blob/master/Changes.md#413
* https://gitlab.com/gitlab-org/gitlab-ce/issues/19441

See merge request !5056
2016-07-03 18:18:59 +00:00
Stan Hu 95336861e9 Merge branch 'redcloth-4-3-2-cve-2012-6684' into 'master'
Update RedCloth to 4.3.2 for CVE-2012-6684

## What does this MR do?

To fix XSS (CVE-2012-6684), upgrade RedCloth to 4.3.2.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Security vulnerability in RedCloth (CVE-2012-6684) should be fixed to provide GitLab as a secure software.

## What are the relevant issue numbers?

Closes #19169 

cf. !2037, !2071

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [n/a] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [n/a] API support added
- Tests
  - [n/a] Added for this feature/bug
  - [x] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4929
2016-07-03 09:31:31 +00:00
Robert Schilling 328fbd82a3 Merge branch '19448-merge-requests-api-has-incorrect-documentation-regarding-merge_when_build_succeeds' into 'master'
Fix typo in Merge Requests API documentation

Closes #19448

See merge request !5057
2016-07-03 08:00:24 +00:00
Takuya Noguchi a034374f00 Update CHANGELOG 2016-07-03 12:24:42 +09:00
Takuya Noguchi b686338898 Update RedCloth to 4.3.2 for CVE-2012-6684 2016-07-03 12:23:19 +09:00
Alejandro Rodríguez 52008045e5 Fix typo in Merge Requests API documentation 2016-07-02 17:44:19 -04:00
Stan Hu 26525064a8 Downgrade to Redis 3.2.2 due to massive memory leak with Sidekiq
See:

https://github.com/mperham/sidekiq/blob/master/Changes.md#413
https://gitlab.com/gitlab-org/gitlab-ce/issues/19441
2016-07-01 19:46:08 -07:00
Douwe Maan fc3402b7ea Merge branch 'git-http-kerberos-ce' into 'master'
Groundwork for Kerberos SPNEGO (EE feature)

Refactor Projecst::GitHttpController to allow Kerberos integration in GitLab EE.

Companion to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/509

See merge request !5037
2016-07-01 22:24:49 +00:00
Douwe Maan d1c94f034b Merge branch 'explicit-requesters-scope' into 'master'
Exclude requesters from Project#members, Group#members and User#members

## What does this MR do?

It excludes requesters from the `Project#members`, `Group#members` and `User#members` associations, and adds new `Project#requesters` and `Group#requesters` associations.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Without this, if you call `project.members`, requesters are included in the results! This is at best misleading, and at worst can lead to security issues. By excluding requesters from the `#members` associations, we avoid introducing security inadvertently since you have to call the `#requesters` association explicitly to get requesters.

## What are the relevant issue numbers?

This is something I realized while fixing the security issue #19102.

## Does this MR meet the acceptance criteria?

- [x] I don't think this needs a CHANGELOG since this is an internal change
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4946
2016-07-01 22:23:26 +00:00
Robert Speicher 0ccdc631e6 Merge branch 'upgrade-sidekiq' into 'master'
Upgrade Sidekiq from 4.1.2 to 4.1.4.

Adds a dependency on Sinatra and allows Sinatra 2 for eventual support of Rack 2.

Changelog: https://github.com/mperham/sidekiq/blob/master/Changes.md#414

Working toward #14286. 

See merge request !5044
2016-07-01 20:55:13 +00:00
Robert Speicher 62730e5431 Merge branch 'upgrade-seedfu' into 'master'
Upgrade seed-fu from 2.3.5 to 2.3.6

Adds Rails 5 support. Working toward #14286.

Changelog: https://github.com/mbleigh/seed-fu/blob/master/CHANGELOG.md#version-236

See merge request !5042
2016-07-01 20:53:06 +00:00
Robert Speicher f89a3349c0 Merge branch 'upgrade-sass-rails' into 'master'
Upgrade sass-rails

## What does this MR do?

Upgrades sass-rails from 5.0.4 to 5.0.5. Includes support for Rails 5.

Changelog: https://github.com/rails/sass-rails/releases

Working toward #14286 

See merge request !5030
2016-07-01 20:52:10 +00:00
Robert Speicher 31d73135b7 Merge branch 'rubocop/enable-cops-for-empty-lines' into 'master'
Enable Style/EmptyLines Rubocop cop

#17478

See merge request !5013
2016-07-01 20:27:26 +00:00
Fatih Acet d6efef0f2a Merge branch 'renable-import-button-when-namespace-already-been-taken' into 'master'
Renable import button when import process fail due to the namespace already been taken

Closes #19435 

## Screenshots (if relevant)

Before:

![1](/uploads/e8de1b326e0751891f667630a7685f6a/1.png)<br/><br/>

After:

![2](/uploads/566f1fd5442c28232350689fce8eae76/2.png)

See merge request !5053
2016-07-01 20:09:27 +00:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Douglas Barbosa Alexandre 9dab692a2b Update CHANGELOG 2016-07-01 16:43:11 -03:00
Douglas Barbosa Alexandre 3d69d01e1f Cache results from jQuery selectors to retrieve namespace name 2016-07-01 16:43:11 -03:00
Douglas Barbosa Alexandre 8353cc6111 Fix import button when import fail due the namespace already been taken 2016-07-01 16:04:24 -03:00
Rémy Coutable b227355973 Merge branch '19388-fix-snippets-notes-not-shown' into 'master'
Fix snippets comments not displayed

## What does this MR do?

Fix an issue where comments body were not displayed for project snippets anymore (see commit for details).

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Because of #19388.

## What are the relevant issue numbers?

Fixes #19388.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [ ] All builds are passing
- [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 you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5045
2016-07-01 17:16:05 +00:00
Achilleas Pipinellis 97424d0dd2 Merge branch 'patch-3' into 'master'
adding link to .gitlab-ci.yml templates

closes #18998

## What does this MR do?

Add link to CI templates

## Are there points in the code the reviewer needs to double check?

No

## Why was this MR needed?

Asked by Sid - see #18998 

## What are the relevant issue numbers?

up 

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [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)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] 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 you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5033
2016-07-01 17:10:19 +00:00
Stan Hu 88dbc4d110 Merge branch 'fix-relative-root-emoji-support' into 'master'
Fix emoji paths in relative root configurations

## What does this MR do?

If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s.

## Are there points in the code the reviewer needs to double check?

At first, I tried to use `ActionView::Helpers::AssetUrlHelper.asset_url` since this is what it's intended to do. But this helper function is extremely slow, and it took minutes to generate the URLs for the hundreds of links needed for each emoji.

## Why was this MR needed?

Because emojis were broken in relative URL installations

## What are the relevant issue numbers?

#15642

## Does this MR meet the acceptance criteria?

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

See merge request !5027
2016-07-01 16:51:03 +00:00
Rémy Coutable d71983f599 Fix snippets comments not displayed
The issue was that @notes were not passed to Banzai::NoteRenderer.render
in Projects::SnippetsController#show. This was forgotten in d470f3d1.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-01 18:39:19 +02:00
Robert Speicher d9edea9735 Merge branch 'upgrade-thin' into 'master'
Upgrade Thin from 1.6.1 to 1.7.0.

Includes support for Rack 2. Working toward #14286.

Changelog: https://github.com/macournoyer/thin/blob/master/CHANGELOG

See merge request !5047
2016-07-01 16:17:54 +00:00
Stan Hu 4bfe10d5f9 Fix emoji paths in relative root configurations
If a site specifies a relative URL root, emoji files would omit the path from
the URL, leading to lots of 404s.

Closes #15642
2016-07-01 09:10:12 -07:00
Rémy Coutable bd78f5733c Exclude requesters from Project#members, Group#members and User#members
And create new Project#requesters, Group#requesters scopes.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-01 17:44:46 +02:00
Rémy Coutable 557ca2b31f Merge branch 'todos-api' into 'master'
Add Todos API

* Closes #14068
* Closes #14675 

- [x] Implementation
- [x]  Tests
- [x] Documentation
- [x] Changelog

See merge request !3188
2016-07-01 15:36:05 +00:00
Rémy Coutable c368cb605b Merge branch 'fix/import-export-events' into 'master'
Fixing problems with events for import/export

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

A couple of issues related to target being missing in exported `Events` (as being polymorphic and not have `ActiveRecord` relationships is a bit more tricky than normal models) plus as the export was in JSON, the import retrieves hashed fields as stringified hashes and not symbolized - so fixed that as well, which was the cause of https://gitlab.com/gitlab-org/gitlab-ce/issues/19202

Also fixed / refactored tests
:simpl
Import/Export Version has been bumped to 0.1.1 as theses changes to events won't work very well with old exports - forcing users to generate a new export in the new version.

See merge request !4987
2016-07-01 15:35:12 +00:00
Robert Speicher b37a8d8f66 Merge branch 'upgrade-sprockets-rails' into 'master'
Upgrade sprockets and sprockets rails, remove quiet_assets

## What does this MR do?

Upgrade Sprockets from 3.6.0 to 3.6.2.

Changelog: https://github.com/rails/sprockets/blob/3.x/CHANGELOG.md

Upgrade Sprockets Rails from 3.0.4 to 3.1.1.

Changelog: https://github.com/rails/sprockets-rails/compare/v3.0.4...v3.1.1

quiet_assets has been seemingly abandoned, and now sprockets-rails has the feature built-in!

The config was added in this PR: https://github.com/rails/sprockets-rails/pull/355

Working towards #14286.

See merge request !5029
2016-07-01 15:34:04 +00:00
Connor Shea fb056c78a7 Upgrade Thin from 1.6.1 to 1.7.0.
Includes support for Rack 2.

Changelog: https://github.com/macournoyer/thin/blob/master/CHANGELOG
2016-07-01 09:34:02 -06:00
Rémy Coutable 984698dc96 Merge branch 'refactor-tags-branches-api' into 'master'
Ensure that branch and tag names are given in API

## What does this MR do?

It ensures that the tag or branch name is given. @rymai We talked in an earlier MR about this.

See merge request !5012
2016-07-01 15:25:23 +00:00
Jacob Schatz 6c0d3b4cf3 Merge branch 'cache-autocomplete-results' into 'master'
Cache autocomplete results

## What does this MR do?

Caches the results of the autocomplete AJAX call to stop new GFM inputs on the page from requesting new data. The cache is then cleared on each new page so that it doesn't stay around per project.

See merge request !5043
2016-07-01 14:41:52 +00:00
James Lopez e7319d0a25 Many squashed commits 2016-07-01 16:22:03 +02:00
Phil Hughes cc154fc47b Cache autocomplete results 2016-07-01 15:03:36 +01:00
Connor Shea 44544b3481 Upgrade Sidekiq from 4.1.2 to 4.1.4.
Adds a dependency on Sinatra and allows Sinatra 2 for eventual support of Rack 2.

Changelog: https://github.com/mperham/sidekiq/blob/master/Changes.md#414
2016-07-01 08:02:04 -06:00
Connor Shea 1586846790 Upgrade seed-fu from 2.3.5 to 2.3.6
Adds Rails 5 support.

Changelog: https://github.com/mbleigh/seed-fu/blob/master/CHANGELOG.md#version-236
2016-07-01 07:57:01 -06:00
James Lopez f29c30475e use has_many relationship with events 2016-07-01 15:34:10 +02:00
James Lopez d6d0a35598 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-export-events 2016-07-01 14:52:38 +02:00
Robert Schilling 87ac9c9850 Support creating a todo on issuables via API 2016-07-01 14:52:04 +02:00
Robert Schilling 3942621329 Expose target, filter by state as string 2016-07-01 14:52:04 +02:00
Robert Schilling fd9cd5ae8c Add todos API documentation and changelog 2016-07-01 14:51:59 +02:00
Rémy Coutable c578fb064c Merge branch '18310-improve-request-access-button' into 'master'
Improve the request / withdraw access button

## What does this MR do?

It implements the design proposed in #18310.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

To close #18310.

## What are the relevant issue numbers?

Closes #18310.

## Screenshots

### Group access request

#### Request button

| Medium | Large |
| ----------- | ------- |
| ![request_access_button](/uploads/a1de370dcbb8ac9a63d2df5c68591db7/request_access_button.png) | ![request_access_button-large](/uploads/0a1c70380268e620a6ca4d3e1661d58c/request_access_button-large.png) |

#### Withdraw request button

| Medium | Large |
| ----------- | ------- |
| ![withdraw_access_request_button](/uploads/c9df39d04b61566ec143d5e9cc43ada2/withdraw_access_request_button.png) | ![withdraw_access_request_button-large](/uploads/10fdaa94d72956e06bdb995e65b51472/withdraw_access_request_button-large.png) |

### Project access request

#### Request button

| Medium | Large |
| ----------- | ------- |
| ![request_access_button](/uploads/8e71395041a5cea996a35df2083bb723/request_access_button.png) | ![project-request_access_button-large](/uploads/adb2dec0eccec8e5171dc0e26e6b03a6/project-request_access_button-large.png) |

#### Withdraw request button

| Medium | Large |
| ----------- | ------- |
| ![withdraw_access_request_button](/uploads/12be06f0a2bf9426a5e043f52c4d1dab/withdraw_access_request_button.png) | ![project-withdraw_access_request_button-large](/uploads/93fda7767ee5f02186c4c954ea346254/project-withdraw_access_request_button-large.png) |

## Does this MR meet the acceptance criteria?

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

See merge request !4860
2016-07-01 12:48:13 +00:00
Yorick Peterse 4bb41c5e96 Merge branch '18592-syntaxhighlighter-slow' into 'master'
Specific metrics for code on Banzai::Filter::SyntaxHighlightFilter

See merge request !5038
2016-07-01 12:13:17 +00:00
Rémy Coutable 8625bd3622 Improve the request / withdraw access button
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-01 12:48:54 +02:00
Paco Guzman 521454831e Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab 2016-07-01 12:34:28 +02:00
Rémy Coutable b569f842b3 Merge branch 'enable-shared-runners-with-admins' into 'master'
Admin should be able to turn shared runners into specific ones:

## What does this MR do?

Make sure admins could turn shared runners into specific runners.

## Are there points in the code the reviewer needs to double check?

Is this the desired behaviour?

## Why was this MR needed?

Closes #19039
Closes #19272

![Screen_Shot_2016-06-30_at_9.30.05_PM](/uploads/97eb3b4923fd4e498b1f8ca70b1345c8/Screen_Shot_2016-06-30_at_9.30.05_PM.png)

See merge request !4961
2016-07-01 10:10:46 +00:00
Yorick Peterse a647d55773 Merge branch 'avoid-instantiate-tree-for-projects-show-readme-view' into 'master'
Avoid instantiation of a Git::Tree

See merge request !4997
2016-07-01 09:51:50 +00:00