Commit Graph
1930 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 5f34759ecb Allow user to specify content he wants to see on project page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-13 18:24:15 +02:00
Dmitriy Zaporozhets 171d6fccae Merge branch 'rs-disable-2fa-by-admin' into 'master'
Allow admins to disable 2FA for a user

> ![Screen_Shot_2015-07-10_at_5.19.13_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3f9bb7c783110d2689c282879cb4b061/Screen_Shot_2015-07-10_at_5.19.13_PM.png)

Depends on !961

See merge request !962
2015-07-13 08:49:46 +00:00
Dmitriy Zaporozhets d93da8bed5 Merge branch 'rs-disable-2fa' into 'master'
Add User#disable_two_factor!

This method encapsulates all the logic for disabling 2FA on a specific
User model.

See merge request !961
2015-07-13 08:47:55 +00:00
Dmitriy Zaporozhets 10d5da784b Merge branch 'fix-api-project-transfer' into 'master'
Fix transferring of project to another group using the API.

Addresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2397.

See merge request !926
2015-07-13 08:42:42 +00:00
Marin Jankovski 64c57502b6 Merge branch 'hsts-check-port-443' into 'master'
Only enable HSTS header for HTTPS and port 443

### What does this MR do?

This MR adds a check that the port used is 443, in addition to HTTPS being enabled, when activating the HSTS header.

### Why was this MR needed?

If a user is using a non-standard port for SSL, enabling this header would send clients to port 443 when that port is invalid.

### What are the relevant issue numbers?

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

See merge request !966
2015-07-13 08:09:51 +00:00
Stan Hu f4f216db67 Only enable HSTS header for HTTPS and port 443
Closes https://github.com/gitlabhq/gitlabhq/issues/9449
2015-07-12 21:37:10 -07:00
Douwe MaanandRobert Speicher b93053695a Fix transferring of project to another group using the API. 2015-07-11 16:47:33 -04:00
Stan Hu 96644c1fc1 Better handle unknown projects and groups for autocomplete 2015-07-11 06:19:32 -07:00
Stan Hu 0b67d7a0fe Fix user autocomplete for unauthenticated users accessing public projects
Closes #1955
2015-07-10 17:39:58 -07:00
Robert Speicher 800df45db2 Add disable_two_factor route for Admin::Users 2015-07-10 17:18:17 -04:00
Robert Speicher 22724418d3 Add User#disable_two_factor!
This method encapsulates all the logic for disabling 2FA on a specific
User model.
2015-07-10 16:18:30 -04:00
Dmitriy Zaporozhets e9ab09c6b5 Merge branch 'project-home-page' 2015-07-09 12:10:40 +02:00
Dmitriy Zaporozhets 43e410ad04 Merge branch 'rs-issue-1750' into 'master'
Ensure `@sort` is set by set_filters_params

Closes #1750

See merge request !943
2015-07-09 08:29:30 +00:00
Robert Speicher 335749d754 Ensure @sort is set by set_filters_params
Closes #1750
2015-07-08 18:17:13 -04:00
Dmitriy Zaporozhets f0e1da04f0 Show last push widget on several project pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-08 23:21:35 +02:00
Dmitriy Zaporozhets c2f02fc1a4 Refactor star and fork buttons
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-08 12:25:34 +02:00
Dmitriy Zaporozhets d192f921c1 Move project activity to separate tab. Add more features to project home page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-07 16:01:12 +02:00
Stan Hu 4254f09eaa Return 40x error codes if branch could not be deleted in UI 2015-07-06 09:47:22 -07:00
Stan Hu e2190115e8 Merge branch 'graphs-branch-switching' into 'master'
Add ref switching support for graphs

It is now possible to view contributor and commit statistics for
refs beyond the default branch. While the Git ref already was part of
the path it has not been used before.

Additionally, the code in RefsController#switch has been slighliy
refactored since it would have become confusing with additional if-else
branches added.

See merge request !932
2015-07-06 15:12:24 +00:00
Daniel Gerhardt 2963e7fd1c Add ref switching support for graphs
It is now possible to view contributor and commit statistics for
refs beyond the default branch.

Additionally, conditions in RefsController#switch have been refactored
in order that a `case` block is used now.
2015-07-06 16:44:30 +02:00
Dmitriy Zaporozhets f3590c83ea Merge branch 'audit_log' into 'master'
Audit log for user authentication

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

See merge request !931
2015-07-06 10:09:53 +00:00
Valery Sizov 411829fdb5 Audit log for user authentication 2015-07-06 12:36:08 +03:00
Dmitriy Zaporozhets 5f52d6a038 Merge branch 'add-irker-options' into 'master'
Add Irker service configuration options

### What does this MR do?

This MR makes a number of hard-coded Irker parameters configurable in the service settings: Irker server host, port, and default IRC URI. It also removes the "max recipient" limit since the recipient list is configurable only by the project owner, and it makes no sense to update the limit when it is implied in the recipient list already.

### Why was this MR needed?

The existing service assumed that gitlab.com was running an Irker daemon on `localhost` when it was not. Using Irker on gitlab.com thus did not work at all. This MR allows users to provide their own Irker daemons.

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

My main concern is whether allowing a user to specify the server/port combination would have security implications for a host. Given that HipChat and Slack allow users to do this, I didn't think this was doing anything novel.

### What are the relevant issue numbers?

* Closes #1713
* Closes #1714
* Closes gitlab-com/support-forum#139

### Screenshots

### Before

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

### After

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cceaba951c05bd3df2c842cc68046b87/image.png)

See merge request !930
2015-07-06 08:57:16 +00:00
Stan Hu d4be82d1c9 Add Irker service configuration options
Closes #1713
Closes #1714
Closes gitlab-com/support-forum#139
2015-07-05 06:40:56 -07:00
Daniel Gerhardt bee3979a4a Fix redirection to home page URL for unauthorized users
Redirection to the home page URL was broken by changing the target for
`root_url` from `DashboardController` to `RootController` in
94d3c1433d. This regression was introduced
in the 7.12.0 release.

Fixes #1916.
2015-07-03 00:22:20 +02:00
Dmitriy Zaporozhets 7081ab1e9e Merge branch 'add-unlock-access' into 'master'
Add support for unlocking users in admin settings

### What does this MR do?

This MR gives the ability to unlock a user from the Admin panel.

### Why was this MR needed?

If a user fails to login a certain number of times, Devise locks the user out for a certain amount of time (e.g. 10 minutes). There is no way for an admin to unlock a user if this happens (aside from editing the `locked_at` field entirely).

### Screenshots

#### Admin index page

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/14c661d1d1f026770997b19af714c514/image.png)

#### Admin edit user page

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/0c6f795757e5f03eeb923d818b7d6a96/image.png)

### What are the relevant issue numbers?

This replaces !288.

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

See merge request !922
2015-07-02 13:39:35 +00:00
Stan Hu 3e738e3b9a Add support for unlocking users in admin settings
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
2015-07-02 04:22:51 -07:00
Douwe Maan cd5e79e98b Correctly show anonymous authorized applications under Profile > Applications. 2015-07-02 11:53:31 +02:00
Douwe Maan 690aafebdb Merge branch 'group_settings_nav' into 'master'
Fix consistency issue in sidebars of Project and Group Settings.

Fixes #2277

![before_after_group_settings_nav](https://dev.gitlab.org/gitlab/gitlabhq/uploads/370c701d0eff8f1f8e44cf954c75f2bf/before_after_group_settings_nav.png)

See merge request !1871
2015-07-01 09:32:41 +00:00
Dmitriy Zaporozhets d63371ad78 Update controller filters
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 16:44:21 +02:00
Dmitriy Zaporozhets 342d553709 Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Nicolas a521e88fc0 Fix consistency issue in sidebars of Project and Group Settings.
Fixes #2277.
2015-06-24 18:05:16 +02:00
Dmitriy Zaporozhets a3f64b195e Improve performance for merge_request#show page
* store @participants in variable
* store result of subscribed? call into variable

In total it reduce amount of SQL queries for merge_request with 10
comments/participants twice.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-24 12:56:10 +02:00
Dmitriy Zaporozhets a5f23435f7 Improve performance for issue#show page
* store @participants in variable
* store result of subscribed? call into variable

In total it reduce amount of SQL queries for issue with 10 comments/participants twice.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-24 12:49:34 +02:00
Dmitriy Zaporozhets 94f130cbfc Merge branch 'admin-edit-identities' into 'master'
Admin can see, edit and remove user identities

Related to #1415 and https://dev.gitlab.org/gitlab/gitlabhq/issues/2224

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !843
2015-06-23 14:24:16 +00:00
Stan Hu e80d7a804f Fix error when deleting a user who has projects
Closes #1856
Closes https://github.com/gitlabhq/gitlabhq/issues/9394
2015-06-23 04:39:49 -07:00
Dmitriy Zaporozhets 1beb0dbe56 Fix admin identities code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-23 10:26:50 +02:00
Dmitriy Zaporozhets d7553d3630 Address review comments
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 18:01:52 +02:00
Dmitriy Zaporozhets 73e003013f Merge branch 'master' into admin-edit-identities
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/views/admin/users/show.html.haml
2015-06-22 18:00:11 +02:00
Dmitriy Zaporozhets cc04c5b828 Refactor admin user page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 17:12:20 +02:00
Dmitriy Zaporozhets d3978e0b27 Merge branch 'remove_unused_except' into 'master'
projects doesn't seem to be a valid action in this controller

Hi,

This is just a tiny change. Let me know if I'm doing it wrong...

Eaden

See merge request !696
2015-06-22 13:20:14 +00:00
Dmitriy Zaporozhets 29b6d465a7 Merge branch 'rs-dev-issue-2355' into 'master'
MergeRequest#show performance improvements

This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:

- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.

See merge request !838
2015-06-22 09:48:49 +00:00
Robert Speicher b6318297fc Use User#two_factor_enabled instead of otp_required_for_login 2015-06-19 15:14:37 -04:00
Dmitriy Zaporozhets d059c69db7 Move identities list to own controller action
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-19 15:29:53 +02:00
Dmitriy Zaporozhets 270b7ce810 Add ability for admin to edit user identity
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-19 15:29:53 +02:00
Dmitriy Zaporozhets 228da2dd28 Admin can see and remove user identities
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-19 15:29:52 +02: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
Robert Speicher bc027c5183 Load the Merge Request > Commits tab lazily 2015-06-17 16:59:51 -04: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