Commit Graph
31227 Commits
Author SHA1 Message Date
Lin Jen-Shin 9d8dca08e4 Use AR callbacks as suggested by:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12744656
2016-06-29 17:44:39 +08:00
Lin Jen-Shin 1bc0d732f6 Also remove ci_builds.artifacts_size when erased 2016-06-28 20:37:46 +08:00
Lin Jen-Shin de54335958 Prefer Ci::Build#erase_artifacts! 2016-06-28 20:32:32 +08:00
Lin Jen-Shin 0a294698db Just save the size in total rather than individual files
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12741046
2016-06-28 11:16:48 +00:00
Lin Jen-Shin fe0c59d2e6 Introduce ci_builds.artifacts_sizes as JSON:
We store the sizes as a hash from path to bytes like:

``` ruby
{'ci_artifacts.txt' => 27,
 'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' =>
71759,
 'other_artifacts_0.1.2/doc_sample.txt' => 1314,
 'rails_sample.jpg' => 35255,
 'tests_encoding/utf8 test dir ✓/regular_file_2' => 7}
```

So that it's easier to access than reading gzip file again.
2016-06-28 18:14:21 +08:00
Lin Jen-Shin aa3a3fd12f Cleanup the tests a bit in order to extend it 2016-06-28 16:46:16 +08:00
Robert Speicher c9a4626333 Merge remote-tracking branch 'dev/master' 2016-06-27 18:39:42 -04:00
Robert Speicher 0fd4b9d3e2 Merge branch 'rename_license_template_api' into 'master'
Rename Licenses API to License Templates API

## What does this MR do?

Earlier I renamed this in EE, thinking license templates was an EE-only feature. This backports that change to CE. Thanks to @vsizov for pointing out this error.

See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/400 for the EE merge request. 

See merge request !4957
2016-06-27 20:15:31 +00:00
Drew Blessing 1910fd05ae Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
Douwe Maan e4dacb353e Merge branch 'issue_18398' into 'master'
Check for conflict with wiki projects when creating a new project.

## What does this MR do?
Check for conflict with wiki projects when creating a new project
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
To avoid exposing the information from the wiki repository of other project
## What are the relevant issue numbers?
#18398 
## Screenshots (if relevant)
![Screen_Shot_2016-06-24_at_6.03.49_PM](/uploads/7bf55e5159bf0c2b653b8f4f941f72fc/Screen_Shot_2016-06-24_at_6.03.49_PM.png)
## Does this MR meet the acceptance criteria?

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

See merge request !4918
2016-06-27 19:15:22 +00:00
Robert Speicher 8a197c15d4 Merge branch 'fix-18997' into 'master'
Fix visibility of snippets when searching

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

See merge request !1972
2016-06-27 18:43:12 +00:00
Robert Speicher 7d8b3a0314 Merge branch '19102-fix' into 'master'
Fix an information disclosure when requesting access to a group containing private projects

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

The commit speaks for itself:

    Fix an information disclosure when requesting access to a group containing private projects
    
    The issue was with the `User#groups` and `User#projects` associations
    which goes through the `User#group_members` and `User#project_members`.
    
    Initially I chose to use a secure approach by storing the requester's
    user ID in `Member#created_by_id` instead of `Member#user_id` because I
    was aware that there was a security risk since I didn't know the
    codebase well enough.
    
    Then during the review, we decided to change that and directly store the
    requester's user ID into `Member#user_id` (for the sake of simplifying
    the code I believe), meaning that every `group_members` / `project_members`
    association would include the requesters by default...
    
    My bad for not checking that all the `group_members` / `project_members`
    associations and the ones that go through them (e.g. `Group#users` and
    `Project#users`) were made safe with the `where(requested_at: nil)` /
    `where(members: { requested_at: nil })` scopes.
    
    Now they are all secure.

See merge request !1973
2016-06-27 18:41:31 +00:00
Robert Speicher 298e4ece30 Merge branch 'regex-find-replace-http-matcher' into 'master'
Use `have_http_status` matcher where possible

See merge request !4955
2016-06-27 18:38:23 +00:00
Robert Speicher 9c9b0eef46 Merge branch 'cherry-pick-5734e266' into 'master'
Fix rendering of commit notes

See merge request !4953
2016-06-27 18:31:45 +00:00
Ruben Davila 16a0303801 Check for conflict with wiki projects when creating a new project.
This fix avoids exposing the information from the wiki repository of other project.
2016-06-27 13:23:19 -05:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Jacob Schatz e0e325625e Merge branch 'emoji-menu-stick-search' into 'master'
Made the search bar on emoji menu sticky

## What does this MR do?

When scrolling down the emoji menu, the search bar disappears. For better UX, the search bar no stays at the top when scrolling.

## Screenshots (if relevant)

![emoji-sticky](/uploads/a5b4773547d3d67342ddcfc07c8f1568/emoji-sticky.gif)

See merge request !4743
2016-06-27 18:03:08 +00:00
Douwe Maan c6f75fa4f4 Update CHANGELOG 2016-06-27 18:02:03 +00:00
Douwe MaanandDouwe Maan c2223efe84 Fix rendering of commit notes 2016-06-27 18:00:18 +00:00
Stan Hu c3a8b252cd Merge branch 'update-omniauth-saml' into 'master'
Update omniauth-saml to 1.6.0 to address a security vulnerability in ruby-saml

## What does this MR do?

Updates `omniauth-saml` to bring in the new `ruby-saml` dependency that addresses [CVE-2016-5697](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5697)

Fixes #19206 

See merge request !4951
2016-06-27 17:50:24 +00:00
Robert Speicher 21842cf90f Merge branch 'mark-done-todo-id' into 'master'
Correctly return todo ID after creating todo

See merge request !4941
2016-06-27 17:49:29 +00:00
Fatih Acet 121c5c837f Merge branch '19075-new-wiki' into 'master'
Remove duplicate new page btn from edit wiki

## What does this MR do?
Removes duplicate button on wiki page

## What are the relevant issue numbers?
Closes #19075 

## Screenshots (if relevant)
![Screen_Shot_2016-06-24_at_9.45.28_AM](/uploads/8dca96c3e75b428d63acaaba6dede9a6/Screen_Shot_2016-06-24_at_9.45.28_AM.png)
![Screen_Shot_2016-06-24_at_9.45.57_AM](/uploads/e6ea97b07e48d2fe6f108d8c5a943583/Screen_Shot_2016-06-24_at_9.45.57_AM.png)

See merge request !4904
2016-06-27 17:29:03 +00:00
Stan Hu 0fcd72e06f Merge branch 'workhorse-gmake' into 'master'
Mention gmake

Fixes https://gitlab.com/gitlab-org/gitlab-workhorse/issues/46

See merge request !4945
2016-06-27 17:12:29 +00:00
Fatih Acet 70c0d87a5e Merge branch 'new-branch-check-fix' into 'master'
Fix check for existence of New Branch button on Issue page

## What does this MR do?

The condition in [`initCanCreateBranch`][initCanCreateBranch] mistakenly checks `$container` (the New Branch button) for falsy. However JQuery returns an empty array if no matching element was found, so this condition is never met.

## Why was this MR needed?

The wrong condition causes:
* `$.getJSON($container.data('path'))` to be called where `$container.data('path')` is `undefined`
* in this case `$.getJSON` uses `location.href`
* if the current page has a JSON representation, it is fetched and cached by browser and displayed the next time the page is visited (#17365)
* otherwise "Failed to check if new branch can be created" is displayed (#17264)

## What are the relevant issue numbers?

Fixes #17264 and #17365.

[initCanCreateBranch]: https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.8.4/app/assets/javascripts/issue.js.coffee#L102


See merge request !4630
2016-06-27 16:59:05 +00:00
Annabel Dunstone c0bb6d4abf Removed duplicate Changelog entries 2016-06-27 11:58:39 -05:00
Annabel Dunstone 550e40a53c Add conditional for new pag link 2016-06-27 11:52:38 -05:00
Annabel Dunstone e8cf3a7c0b Update changelog 2016-06-27 11:52:38 -05:00
Annabel Dunstone 5d7153e61d Remove duplicate new page btn from edit wiki 2016-06-27 11:52:38 -05:00
Jacob Schatz 89506940f4 Merge branch 'revert-sri' into 'master'
Revert Subresource Integrity pending a fix for Firefox's incorrect hashing implementation.

Per the discussion in #18230, Firefox support is broken :(

cc: @jschatz1 

See merge request !4943
2016-06-27 16:13:37 +00:00
Phil Hughes d17ab054cf Correctly returns todo ID after creating todo 2016-06-27 17:00:27 +01:00
Patricio Cano 6963dcb56b Updated CHANGELOG 2016-06-27 11:00:08 -05:00
winniehell 87fcb0abcb Fix check for existence of new branch button (!4630) 2016-06-27 17:59:50 +02:00
Rémy Coutable 3659992cd5 Merge branch 'fix/sidekiq-mem-killer-debug' into 'master'
Better debugging for memory killer middleware

This adds more info to the warning messages output by `MemoryKiller`.

Previously only the PID was showed, making it difficult to debug issues like https://gitlab.com/gitlab-org/gitlab-ce/issues/19124

This adds the worker class and job ID to the log messages.

See merge request !4936
2016-06-27 15:47:16 +00:00
Rémy Coutable 4f39e72773 Merge branch 'image-sizing' into 'master'
Image sizing

## What does this MR do?

Limits image height to fit the screen. The wrapping div is so the image is guaranteed to be a block element without the link area growing to be larger than the image itself.

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

Make sure this can't be done in a more performant or concise way with Banzai.

## Why was this MR needed?

Images were displayed at their full resolution, which made it difficult to read issues when the image height was greater than the viewport height (see #18861).

## What are the relevant issue numbers?

Fixes #18861.

## Screenshots (if relevant)

Before:

![Screen_Shot_2016-06-20_at_3.25.26_PM](/uploads/158424375ade95adcd337ccd34c48747/Screen_Shot_2016-06-20_at_3.25.26_PM.png)

After:

![Screen_Shot_2016-06-20_at_3.24.57_PM](/uploads/f1a3b5f6442e4e3b1067332a547fb1c8/Screen_Shot_2016-06-20_at_3.24.57_PM.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] 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)

cc: @jschatz1 @dzaporozhets @rspeicher

See merge request !4810
2016-06-27 15:45:01 +00:00
Patricio Cano c8cf159d14 Update omniauth-saml to 1.6.0 to address a security vulnerability in ruby-saml 2016-06-27 10:37:54 -05:00
James Lopez e69af6d251 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/sidekiq-mem-killer-debug 2016-06-27 17:17:11 +02:00
Rémy Coutable 7ca3685959 Merge branch 'test-gitlab-ci-ymls' into 'master'
Test templates and GitLabCI parser againts each other

## What does this MR do?

Test the available templates against the preprocessor and vice versa

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

The dynamic creation of tests seems a little hacked. Is there a cleaner way?

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added -- Seems unneeded
- [x] 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)

See merge request !4898
2016-06-27 15:16:19 +00:00
Connor Shea c7b04841c0 Wrap images in divs with Banzai and limit max-height.
Add max-height to prevent images from displaying larger than the provided screen size.

Also fix a failing test and add a new one.
2016-06-27 09:16:07 -06:00
Rémy Coutable 8267b4ae71 Merge branch 'fix-changelog-entries' into 'master'
Remove duplicate changelog entry

## What does this MR do?

Removes a changelog entry from 8.9.1, which is only present in 8.10



See merge request !4937
2016-06-27 15:10:19 +00:00
Rémy Coutable 52be433c36 Merge branch 'case-insensitive-ci-skip' into 'master'
Allow "ci skip" to be in any case

## What does this MR do?

This MR makes the check for the [ci skip] tag in a commit message case insensitive and adds support for [skip ci].

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

No.

## Why was this MR needed?

I couldn't understand why some of my commits were being built, even though they contained "[CI Skip]".

## What are the relevant issue numbers?
N/A
## Screenshots (if relevant)
N/A
## 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)
- [x] 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 !4785
2016-06-27 14:53:21 +00:00
Achilleas Pipinellis f48f7760c2 Merge branch 'update-ee-downgrade-instructions' into 'master'
Update EE downgrade instructions to include JenkinsDeprecatedService

EE now includes JenkinsDeprecatedService in addition to JenkinsService, so we need to clean both when downgrading from EE to CE.

Closes #19133
    
[ci skip]

See merge request !4916
2016-06-27 14:34:48 +00:00
Achilleas Pipinellis 298b4850ba Merge branch 'remove-docs-for-gitlab-ci-service-api' into 'master'
Remove docs for GitLab CI Service API

## What does this MR do?

Documentation update: http://docs.gitlab.com/ce/api/services.html

Old GitLab CI Service API description will be removed from the docs.

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

n/a

## Why was this MR needed?

Obsolete information is harmful than nothing.

## What are the relevant issue numbers?

Closes #19167

## Does this MR meet the acceptance criteria?

- [n/a] [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)
- [n/a] API support 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 !4927
2016-06-27 14:33:47 +00:00
Jacob Vosmaer 46d2015ea5 Mention gmake 2016-06-27 16:23:30 +02:00
Connor Shea 47b9b162c7 Revert Subresource Integrity pending a fix for Firefox's incorrect hashing implementation. 2016-06-27 07:47:33 -06:00
Achilleas Pipinellis 0115ab7f40 Merge branch '2979-document-2fa-auth-changes' into 'master'
Add notices about disabling auth features for users with 2FA.

Related to #2979

- Document the proposed changes to the GitLab authentication system.
- This is done because currently, users with 2FA enabled are allowed API access without a 2FA token.

# Tasks

- [ ]  #2979 !xxxx - Document proposed auth changes for 2FA users
    - [x]  Wait for replies on "[potential avenues for documenting the planned changes](https://gitlab.com/gitlab-org/gitlab-ce/issues/2979#note_12591578)"
    - [x]  Update documentation
    - [ ]  CHANGELOG entry?
    - [ ]  Merge conflicts

See merge request !4815
2016-06-27 12:15:57 +00:00
Robert Schilling 591e6c3b14 Remove duplicate changelog entry 2016-06-27 13:19:42 +02:00
James Lopez a7b1b51226 better debugging for memory killer middleware 2016-06-27 12:11:01 +02:00
Rémy Coutable a9dbd394a6 Merge branch 'refactor/ci-config-add-entry-error' into 'master'
Improve validations and error handling in new CI config entries

## What does this MR do?

This MR improves validation in new CI config.

## Why was this MR needed?

With that it will be easier to handle errors during validation and post-processing.

## What are the relevant issue numbers?

This is a continuation of #15060

See merge request !4560
2016-06-27 08:24:17 +00:00
Rémy Coutable 030db5c33e Merge branch 'remove-unused-templates-from-gitlab-ci' into 'master'
Clean up some unused templates imported from GitLab CI

## What does this MR do?

Clean up some unused templates imported from GitLab CI, for new developers to easily understand the file/directory structure of Gitlab CE.

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

Be sure if removed files are not used now while the committer checked them once.

## Why was this MR needed?

Because the file/directory structure of the repository should be clear and simple and if so new developers can easily understand the file/directory structure of Gitlab CE.

## What are the relevant issue numbers?

Closes #19158 

## Does this MR meet the acceptance criteria?

- CHANGELOG won't be updated due to repository maintenance
- No documentation created/updated
- No API support added
- Tests
  - [skipped] 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 !4922
2016-06-27 08:23:02 +00:00
Timothy Andrew f7fc352b4a Add notices about disabling auth features for users with 2FA. 2016-06-27 13:48:55 +05:30