Commit Graph
31640 Commits
Author SHA1 Message Date
Valery Sizov 3baed8cb6d Services: code style fixes, minor refactoring 2016-07-06 20:58:43 +03:00
Douwe Maan cfd5870b62 Merge branch 'allow-disabling-of-git-access-protocol' into 'master'
Add setting that allows admins to choose which Git access protocols are enabled.

## What does this MR do?

It allows admins to disable one of the two protocols for Git access. They can choose to enable just SSH, HTTP or allow both. If one of them is disabled, the clone URL in the project will show only the allowed protocol, and no dropdown to change protocols will be presented.

## What are the relevant issue numbers?

Full implementation on GitLab's side for #18601 

GitLab Shell implementation: gitlab-org/gitlab-shell!62

GitLab Workhorse implementation: gitlab-org/gitlab-workhorse!51

## Screenshots (if relevant)

![Screen_Shot_2016-06-16_at_12.26.19_PM](/uploads/bad845142e9704a7385b2eaca51fd4eb/Screen_Shot_2016-06-16_at_12.26.19_PM.png)
![Screen_Shot_2016-06-20_at_4.24.54_PM](/uploads/6e452dd269e06f0be23841ce93866ed6/Screen_Shot_2016-06-20_at_4.24.54_PM.png)



/cc @jschatz1  this MR touches the UI. Please review.

See merge request !4696
2016-07-05 22:57:19 +00:00
Patricio Cano 0bdf6fe4ba Use keyword arguments for boolean values and use span instead of a for clone "button" 2016-07-05 16:54:22 -05:00
Patricio Cano be221a30ac Revert back to not defining a default Git access protocol. 2016-07-05 16:54:22 -05:00
Patricio Cano cb24650ab8 Rebasing caused enabled_git_access_protocol to become plural. Fixed here. 2016-07-05 16:54:22 -05:00
Patricio Cano 2e96fcff12 Clone button should not be clickable when there is a disabled protocol 2016-07-05 16:54:22 -05:00
Patricio Cano 29c50c5315 Default Git access protocol to web 2016-07-05 16:54:22 -05:00
Patricio Cano fbaabb3911 Rename enabled_git_access_protocols to singular. 2016-07-05 16:54:22 -05:00
Patricio Cano 120a1189bf Add alt text to the images in the documentation. 2016-07-05 16:54:22 -05:00
Patricio Cano d1151f7621 Don't allow empty strings in the protocol check. 2016-07-05 16:54:22 -05:00
Patricio Cano 9397ce9137 Correct access control flow for Git HTTP requests. 2016-07-05 16:54:22 -05:00
Patricio Cano da15471bb1 Clarify protocol access check, and make Git HTTP access call more specific. 2016-07-05 16:54:22 -05:00
Patricio Cano 0f54e2ae6c Render the status message with plain: so that the message gets passed to the Git client. 2016-07-05 16:54:22 -05:00
Patricio Cano 08018b7a7a Render :forbidden *only* if HTTP is disabled. 2016-07-05 16:54:22 -05:00
Patricio Cano 5841851551 Added documentation on the access restrictions. 2016-07-05 16:54:22 -05:00
Patricio Cano 41c87b9a23 Return :forbidden if HTTP protocol access is not allowed 2016-07-05 16:54:22 -05:00
Patricio Cano ace309d775 Raise an error if no protocol is passed to the GitAccess check. 2016-07-05 16:54:22 -05:00
Patricio Cano 42fb2516d9 Add more tests to the allowed protocols feature 2016-07-05 16:54:22 -05:00
Patricio Cano c98f89eac7 Simplify access checks 2016-07-05 16:54:22 -05:00
Patricio Cano 8b14d1d2c2 Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] to conform to what GitLab Shell expects and make the protocol param in GitAccess mandatory. 2016-07-05 16:54:22 -05:00
Patricio Cano 7735ef86f0 Only allow Git Access on the allowed protocol 2016-07-05 16:54:22 -05:00
Patricio Cano ea9d910c8b Refactor clone button sanitation to its own method to avoid duplication. 2016-07-05 16:54:22 -05:00
Patricio Cano 82652013f2 Fix CSS 2016-07-05 16:54:22 -05:00
Patricio Cano 512adc21fe Add setting that allows admins to choose which Git access protocols are enabled 2016-07-05 16:54:22 -05:00
Douwe Maan 1141eaf5c8 Merge branch '18593-autofilter-rinku-instrumentation' into 'master'
Instrument Rinku usage

## What does this MR do?

Add metrics instrumentation to Rinku, module methods (autolink)

## What are the relevant issue numbers?

#18593 

## 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
  - ~~[ ] 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 !5063
2016-07-05 21:51:56 +00:00
Douwe Maan 95cb0195b0 Merge branch '18593-update-rinku' into 'master'
Bump Rinku to 2.0.0

## What does this MR do?

Update Rinku gem to last stable version.

## What are the relevant issue numbers?

#18593 

## 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
  - ~~[ ] 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 !5064
2016-07-05 21:51:41 +00:00
Fatih Acet 6d12878d5a Merge branch '19161-non-helpful-flash-message-when-attaching-file-fails' into 'master'
Hacked in a better message for attachment network error

## What does this MR do?

Adds a better error message for when a user is uploading an attachment and they cannot reach the GitLab instance.

Now displays `Network error. Please check your connection.`.

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

As noted above, I think this is hacky, ideally this would be sent straight from the backend but if not then this should be handled globally?

/cc @fatihacet 

## Why was this MR needed?

Attachment upload UX

## What are the relevant issue numbers?

Closes #19161.

## Screenshots (if relevant)

*UPDATED:*

![Screen_Shot_2016-06-30_at_00.42.37](/uploads/b3b4044782dd4c4c17735e99acc45502/Screen_Shot_2016-06-30_at_00.42.37.png)

## 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 !4977
2016-07-05 21:51:00 +00:00
Jacob Schatz 025be2f8b7 Merge branch 'underscore-templates' into 'master'
Naive attempt at fixing Underscore templates

## What does this MR do?

Attempts to fix part of #18939.

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

That this doesn't break anything.

## Why was this MR needed?

See #18939.

## What are the relevant issue numbers?

#18939 

## Does this MR meet the acceptance criteria?

- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing

See merge request !4842
2016-07-05 21:44:34 +00:00
Jacob Schatz 4dda6def95 Merge branch 'ff-markdown-buttons-fix' into 'master'
Fixed markdown buttons in FF

## What does this MR do?

The markdown buttons weren't working with the `execCommand` function. So it has to fallback to replacing the value in the textarea.

See merge request !5085
2016-07-05 20:42:03 +00:00
Douwe Maan aa974ed5bc Merge branch 'fix-changelog' into 'master'
Fix Changelog [ci skip]

Fixing a duplicate entry in the Changelog.

Fixes #19526 

See merge request !5098
2016-07-05 18:33:22 +00:00
Robert Speicher 1768b6c063 Merge branch '8-10-guides' into 'master'
Update installation & update guides for 8.10

[ci skip]

See merge request !5097
2016-07-05 18:21:15 +00:00
Connor Shea 5d87f4fc09 Fix Changelog [ci skip] 2016-07-05 12:10:39 -06:00
Robert Speicher 8a62c12d38 Merge branch '18790-dont-show-request-button-to-project-owner' into 'master'
Don't show "request access" button to project owners

This MR fixes an issue where project owners that are not in the project's members list (I believe this is how we handled project owners before, now we seem to create a "Master" member for the project creator) would see the `Request Access` button.

This MR fixes this issue in a clean way by adding a new `:request_access` ability to replace an ugly helper.

It also give project owners the  ability to update & destroy a requester that would happen to be themselves (since owners could request access to their own project before this MR).

Related to #18790.

See merge request !5091
2016-07-05 17:24:46 +00:00
Robert Speicher aefb8a1741 Merge branch 'update-gemoji' into 'master'
Add lib/gitlab/emoji.rb instead of gitlab_emoji gem and upgrade Gemojione

- No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier. Unless there's a particularly good reason we were using the gem?
- Fixes the Rake task since it broke after all the AwardEmoji changes.
- Update gemojione to 2.6.1.

Spring Update changes! http://emojione.com/releases/#2.2.0

See merge request !4919
2016-07-05 17:08:35 +00:00
Rémy Coutable 8c2894aeaf Update installation & update guides for 8.10
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-05 19:04:53 +02:00
Achilleas Pipinellis 10855e7fff Merge branch 'doc-custom-githook-ui' into 'master'
Document custom Git hook error message

## What does this MR do?

Documents new functionality introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5073

## Does this MR meet the acceptance criteria?

- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- 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 !5088
2016-07-05 17:00:01 +00:00
Rémy Coutable 19b80e8252 Add a migration to remove requesters that are owners of their project
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-05 18:55:35 +02:00
Dmitriy Zaporozhets fe9246bf68 Merge branch 'project-header' into 'master'
Updated project header

## What does this MR do?

Updates the project header.

## What are the relevant issue numbers?

Closes #18544, #18832 

## Screenshots (if relevant)

![Screen_Shot_2016-06-29_at_14.16.16](/uploads/4df895e7ecf42e5ddab3f2f1e47f8c7e/Screen_Shot_2016-06-29_at_14.16.16.png)


See merge request !4989
2016-07-05 16:27:16 +00:00
Stan Hu 5323fe418b Merge branch 'rs-avatar_url-performance' into 'master'
Dumb-down avatar presence check in `avatar_url` methods

`avatar.present?` goes through CarrierWave, and checks that the file
exists on disk and checks its filesize. Because we're hitting the disk,
this adds extra overhead to something where the worst-case scenario is
rendering a broken image.

Instead, we now just check that the _database attribute_ is present,
which is good enough for our purposes.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/19273

See merge request !5093
2016-07-05 15:48:03 +00:00
Jacob Schatz 670073765a Merge branch 'new-mr-commit-alignment' into 'master'
Fixed avatar alignment in new MR view

## What does this MR do?

Fixes the alignment of the avatar in the new MR compare view

## Screenshots (if relevant)

![Screen_Shot_2016-07-05_at_16.17.54](/uploads/9c427f66f8ef1d5ecee627e57ee61322/Screen_Shot_2016-07-05_at_16.17.54.png)

See merge request !5095
2016-07-05 15:45:51 +00:00
Phil Hughes 0db54b1587 Fixed avatar alignment in new MR view 2016-07-05 16:16:49 +01:00
Rémy Coutable 9ea80a196f Fix condition in Ability and start with cheaper checks
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-05 16:58:27 +02:00
Robert Speicher c7b68b6e66 Dumb-down avatar presence check in avatar_url methods
`avatar.present?` goes through CarrierWave, and checks that the file
exists on disk and checks its filesize. Because we're hitting the disk,
this adds extra overhead to something where the worst-case scenario is
rendering a broken image.

Instead, we now just check that the _database attribute_ is present,
which is good enough for our purposes.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/19273
2016-07-05 10:51:11 -04:00
Robert Speicher 38533a2f42 Merge branch 'upgrade-doorkeeper' into 'master'
Upgrade Doorkeeper from 3.1.0 to 4.0.0.

Includes Rails 5 support and various bug fixes. Working toward #14286.

Changelog: https://github.com/doorkeeper-gem/doorkeeper/blob/master/NEWS.md#400

See merge request !5055
2016-07-05 13:48:48 +00:00
Dmitriy Zaporozhets 63f9c8d85b Merge branch 'dz-remove-profile-sidebar' into 'master'
Remove current user link to the profile from sidebar

Because user avatar and link to the profile are duplicated in the header now

Related to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4939 and https://gitlab.com/gitlab-org/gitlab-ce/issues/18544

cc @iamphill @jschatz1 

See merge request !5077
2016-07-05 13:47:56 +00:00
Dmitriy Zaporozhets 05e722728c Set user data in profile link in the header
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-07-05 16:17:49 +03:00
Dmitriy Zaporozhets 7facedfb19 Fix profile test to click on header user profile link
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-07-05 16:17:05 +03:00
Dmitriy Zaporozhets bca47688d4 Remove current user link to the profile from sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-07-05 16:17:05 +03:00
Dmitriy Zaporozhets c20ab9f5e8 Merge branch 'dz-add-profile-settings-link' into 'master'
Add profile settings link to header user dropdown

It allows you to get to profile settings right from avatar without triggering sidebar 

Based on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5077#note_12878162 

See merge request !5090
2016-07-05 13:15:26 +00:00
Dmitriy Zaporozhets 1a5348d554 Add profile settings link to header user dropdown
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-07-05 15:40:29 +03:00