Commit Graph
8430 Commits
Author SHA1 Message Date
Robert Speicher dcfce8b198 Use alias_attribute to define User#two_factor_enabled 2015-06-22 21:14:07 -04:00
Robert Speicher d3ff8c1a95 Make default value for otp_required_for_login false instead of null 2015-06-20 19:40:48 -04:00
Robert Speicher 516b4c1248 Allow Admin to filter users by 2FA status 2015-06-19 16:35:53 -04:00
Robert Speicher b6318297fc Use User#two_factor_enabled instead of otp_required_for_login 2015-06-19 15:14:37 -04:00
Robert Speicher 22dd2240a6 Add 2FA status to Admin::Users#show 2015-06-19 15:04:47 -04:00
Robert Speicher 6c8f0fe906 Add convenience methods to User for getting and setting 2FA status 2015-06-19 14:59:42 -04:00
Robert Speicher 7964e7d6a1 Move the User dashboard enum further up in the class 2015-06-19 14:59:07 -04:00
Darby e2e8e384bb Revert "Changed the placeholder text and modified the css class to make it visible"
This reverts commit c39c823421.
2015-06-18 13:50:33 -07:00
Douwe Maan 0e615a4863 Merge branch 'fix-labels-permisssion-check' into 'master'
Fix 403 Access Denied error messages when accessing Labels section in a project

This would occur if the project's issues or merge requests features were disabled. The change in 9bcd36396b caused `can?(current_user, :read_merge_request, project)` to be false if the merge request feature were disabled, so `authorize_labels!` needs to be changed accordingly.

Closes #1813

See merge request !836
2015-06-18 11:43:32 +00:00
Stan Hu 07efb17e10 Fix 403 Access Denied error messages when accessing Labels section in a project that has MRs disabled but issues enabled
Closes #1813
2015-06-18 03:15:05 -07:00
Dmitriy Zaporozhets 79e24886ec Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-06-17 11:56:43 +02:00
Dmitriy Zaporozhets 1eb51e1706 Merge branch 'placeholder_text'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	Gemfile.lock
2015-06-17 11:43:08 +02:00
Dmitriy Zaporozhets 73918efb27 Merge branch 'swellard-issue-6123' into 'master'
Fix duplicate 'Email has already been taken' message when creating a user

devise :validatable and validates uniqueness set on the user email field cause 2 validations to fire when creating a new user with an email address already in use, Issue 6123

@stanhu Thanks for your input on merge request 807, I'll close that one in favour of this as I have added tests

See merge request !817
2015-06-17 09:01:41 +00:00
Dmitriy Zaporozhets de5c9b795d Merge branch 'rs-dev-issue-2373' into 'master'
Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org')

https://dev.gitlab.org/gitlab/gitlabhq/issues/2373

See merge request !821
2015-06-17 09:00:57 +00:00
Darby c39c823421 Changed the placeholder text and modified the css class to make it visible 2015-06-16 14:44:13 -07:00
Robert Speicher 0d7a0675ac Bootlint: Fix incorrectly nested form-group element 2015-06-16 13:33:48 -04:00
Robert Speicher 09b4e11d26 Bootlint: Add missing type attribute for buttons 2015-06-16 13:33:48 -04:00
Robert Speicher e3c1818a3e Bootlint: Modals no longer need a '.hide' class 2015-06-16 13:32:33 -04:00
Robert Speicher 7400cfc114 Bootlint: Use offset grid classes instead of empty divs 2015-06-16 13:32:32 -04:00
Robert Speicher ad049a8e52 Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org') 2015-06-16 13:08:29 -04:00
Douwe Maan adffe47d3c Merge branch 'support-comment-parallel-diff' into 'master'
Support commenting on a diff in side-by-side view

### What does this MR do?

This MR adds support for commenting on a diff in side-by-side (aka parallel) view. It also fixes a JavaScript bug (see !779) when the comment button is clicked on a line that already has a comment.

There is an existing bug where the comment count is not updated when a new comment is added. I'll send a MR for that later.

### Why was this MR needed?

Commenting only worked in "inline" mode. Often the side-by-side view is more conducive to writing comments.

### What are the relevant issue numbers?

Closes https://github.com/gitlabhq/gitlabhq/issues/9283

### Screenshot

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/3d0a3213fde38844a681a826da18139b/image.png)

See merge request !810
2015-06-16 14:43:15 +00:00
swellard 19e5b043fe Fix duplicate 'Email has already been taken' message when creating a user, updated comments 2015-06-16 14:24:05 +01:00
swellard 98615ef536 Fix duplicate 'Email has already been taken' message when creating a user 2015-06-16 14:24:05 +01:00
Stan Hu a7932fe2fd Support commenting on a diff in side-by-side view
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
2015-06-16 06:11:59 -07:00
Dmitriy Zaporozhets fb5ffa89a6 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-06-16 14:45:10 +02:00
Douwe Maan 9af2bc8907 Merge branch 'header_layout_issue' into 'master'
Fix layout issue in header title truncation.

@douwe Thanks for reviewing this fix for the issue mentioned in https://dev.gitlab.org/gitlab/gitlabhq/issues/2314#note_48539.

**BEFORE**

![before](https://dev.gitlab.org/gitlab/gitlabhq/uploads/4ffb35f77155a92c64cfe36c66987eb0/before.gif)

**AFTER**

![after](https://dev.gitlab.org/gitlab/gitlabhq/uploads/2bb2d0c4a93164f6d47e24cdcb9a106b/after.gif)

See merge request !1867
2015-06-16 12:34:21 +00:00
Douwe Maan 63969337a9 Merge branch 'applications_form' into 'master'
Fix UI issues in Applications form

@douwe Thanks for reviewing this small fix.

---

Before:

![application_form_before](https://dev.gitlab.org/gitlab/gitlabhq/uploads/11fbee17ad6a4c9456cd7d6cba5ae429/application_form_before.png)

---

After:

![application_form_after](https://dev.gitlab.org/gitlab/gitlabhq/uploads/0c64214ccda6c77095f468fcb8c748f3/application_form_after.png)

See merge request !1859
2015-06-16 11:50:13 +00:00
Douwe Maan 903132bc07 Merge branch 'fix-ext-issue-webbased-hooks' into 'master'
Fix hooks for web based events with external issue references

The creation of cross references for external issues (which would fail)
is now prevented. This fixes a 500 error and the execution of hooks when
creating a merge request or commenting on one.

Fixes #1650, GH-9333.

This regression might have been introduced by
8f8a8ab32b. There is actually a TODO by
@rspeicher mentioning external issues which is lost (unhandled) in a
later commit.

This fix is related to !766 and !804 which fix a similar issue for hooks for
Git based events.

See merge request !794
2015-06-16 11:36:31 +00:00
Nicolas d8209aebdc Fix layout issue in header title truncation. 2015-06-16 04:16:26 +02:00
Nicolas 4cf7d8d956 Fix consistency issues on New Application page. 2015-06-15 21:27:20 +02:00
Nicolas f18a24f0ac Fix layout issue when New Application validation fails. 2015-06-15 21:27:15 +02:00
Dmitriy Zaporozhets 0674bf2339 Look for .gitlab-ci.yml only if checkout_sha is present
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-15 17:54:42 +02:00
Dmitriy Zaporozhets 6c7131b469 Merge branch 'fix-ext-issue-tracker-hook' into 'master'
Fix external issue tracker hook/test for HTTPS URLs

If HTTPS was used for the 'project_url' of an external issue tracker, an
error was raised because a HTTP connection was established to the
default HTTPS port.

The code has been corrected and simplified by using HTTParty.
Additionally, the request now is made directly to the 'project_url'
instead of the extracted root path.

## The bug is reproducible on gitlab.com
1. Set up a new external issue service (I used Redmine)
2. Set the project URL to 'http://example.com/redmine/projects/x' and
  click on 'Test settings' => Ok
3. Now set the URL to 'https://example.com/redmine/projects/x' and test
  it again => 500

## What is actually happening?
Web servers behave differently when a non-SSL connection is established
to a SSL port:
- Nginx / Apache 2.4: Status code 400
- Apache 2.2: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">...
  (no status code line is sent)
- example.com: Empty response, no status code line

## Relevant log entries
```
2015-06-04T11:10:47.972Z 16785 TID-exfks WARN: {"retry"=>true, "queue"=>"project_web_hook", "class"=>"ProjectServiceWorker", "args"=>[...], "error_message"=>"wrong status line: \"<!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML 2.0//EN\\\">\"", "error_class"=>"Net::HTTPBadResponse", ...}
2015-06-04T11:10:47.972Z 16785 TID-exfks WARN: wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
2015-06-04T11:10:47.972Z 16785 TID-exfks WARN: /usr/lib/ruby/2.1.0/net/http/response.rb:41:in `read_status_line'
[...]
/home/git/gitlab-7.11.4/app/models/project_services/issue_tracker_service.rb:88:in `execute'
/home/git/gitlab-7.11.4/app/workers/project_service_worker.rb:8:in `perform'
[...]
```

See merge request !767
2015-06-15 14:01:10 +00:00
Dmitriy Zaporozhets 7a7c6b469b Fix text align in last push event
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-15 14:54:41 +02:00
Dmitriy Zaporozhets 7300729190 Merge branch 'rs-dev-issue-2228' into 'master'
Allow user to customize default Dashboard page

Renames the "Design" profile page to "Preferences" and adds a field to customize the default Dashboard page:

> ![Screen_Shot_2015-06-11_at_11.12.53_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b5282a3be7861d1148528c6bc9e7a0e0/Screen_Shot_2015-06-11_at_11.12.53_PM.png)

See merge request !778
2015-06-15 11:29:36 +00:00
Marin Jankovski 168d5eabd4 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-06-15 11:34:03 +02:00
Douwe Maan 646ce0aab5 Merge branch 'remove-visibility-icons' into 'master'
Remove visibility icon from projects list on dashboard and group page

## Why?

Because

* visibility level show on project page anyway
* it does not have much value. Main purpose of project list on dashboard is navigation. Avatar + project name helps this goal. Visibility icon have no effect here
* it makes UI worse because it brings separation between project avatar and name
* without visibility icon we have more space for project name. Especially important for laptops

## Screenshot

![Screenshot_2015-06-12_18.17.20](https://gitlab.com/gitlab-org/gitlab-ce/uploads/0e572388e9a337c5a535813911d08c89/Screenshot_2015-06-12_18.17.20.png)

P.S. Merge when 7-12-stable is created

See merge request !806
2015-06-15 07:55:32 +00:00
Douwe Maan 6617e9bbf3 Merge branch 'fix-post-receive-external-tracker' into 'master'
Fix post-receive errors on a push when an external issue tracker is configured

### What does this MR do?

This MR improves upon !766, fixing errors upon a git push that occur only when an external issue tracker (not JIRA) is used. This MR takes into account that external issue trackers, such as JIRA, may close issues. Disabling the processing of post-receive commits when an external issue tracker is configured seems like the wrong behavior.

### Why was this MR needed?

When a user adds an issue reference, the refactoring in 8f8a8ab and a6defd157 caused `project.get_issue` to be called, causing `ExternalIssue` to be returned when an external issue tracker was configured. This object does not have a `close` method, as needed in `CloseService`. Nor does it make sense to associate a `SystemNote` with this object.

GitLab EE uses a [special case for JIRA](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/services/git_push_service.rb#L87). I would recommend moving this logic into `CloseService` too.

### What are the relevant issue numbers?

* Closes #1700
* Closes #1720

See merge request !804
2015-06-15 07:42:24 +00:00
Nicolas 7b5b89eabd Remove button to all projects on Trending Projects page.
Fixes #2001.
2015-06-14 21:30:53 +02:00
Daniel Gerhardt 92bb845e1e Fix hooks for web based events with external issue references
The creation of cross references for external issues (which would fail)
is now prevented.

Fixes #1650, GH-9333.
2015-06-14 17:41:11 +02:00
Nicolas eccdbe367e Highlight Applications nav item when validation fails. 2015-06-14 17:35:03 +02:00
Dmitriy Zaporozhets b645f0f432 Merge pull request #9340 from jvanbaarsen/update-noteable
Update noteable after a new note is added
2015-06-14 12:46:07 +02:00
Robert Speicher 8ae13c7a51 Refactor RootController 2015-06-13 17:59:13 -04:00
Robert Speicher d2894a39e5 Refactor dashboard_choices 2015-06-13 17:59:13 -04:00
Robert Speicher c0cb77e413 Remove redundant help text from custom dashboard selection 2015-06-13 17:59:13 -04:00
Robert Speicher d0463d2c6a Fix alignment of Behavior form; add documentation link 2015-06-13 17:59:13 -04:00
Robert Speicher 1562f017b6 Spec the failure cases for PreferencesController#update 2015-06-13 17:59:12 -04:00
Robert Speicher fb5271ddf1 Make the dashboard choice text match the text in the sidebar 2015-06-13 17:59:12 -04:00
Robert Speicher bf9dd4327e Add feature specs for default dashboard preference 2015-06-13 17:59:12 -04:00
Robert Speicher 1eb9a02f21 Add a form field to customize the dashboard preference 2015-06-13 17:59:11 -04:00