Commit Graph
117 Commits
Author SHA1 Message Date
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 f40b99d02e Merge branch 'master' into rubocop-for-tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/issues_spec.rb
	spec/models/forked_project_link_spec.rb
	spec/models/hooks/service_hook_spec.rb
	spec/models/hooks/web_hook_spec.rb
	spec/models/project_services/hipchat_service_spec.rb
	spec/requests/api/project_members_spec.rb
	spec/requests/api/projects_spec.rb
	spec/requests/api/system_hooks_spec.rb
	spec/services/archive_repository_service_spec.rb
	spec/support/matchers.rb
	spec/tasks/gitlab/backup_rake_spec.rb
2015-06-23 10:44:03 +02:00
Stan Hu 359ed48638 Fix Style/AlignHash cop violations 2015-06-22 22:24:39 -07:00
Robert Speicher 15a05be70d Fix Style/Blocks cop violations 2015-06-22 16:00:54 -04:00
Robert Speicher 94eff65569 Fix Style/SpaceInsideHashLiteralBraces cop violations
These fixes were performed automatically by Rubocop's `-a` flag.
2015-06-22 14:41:00 -04:00
Robert SpeicherandDmitriy Zaporozhets bf71d53f63 Change to_not calls to not_to
Both work, but now we're consistent across the entire app.
2015-06-22 12:13:49 +02:00
Robert SpeicherandDmitriy Zaporozhets 5a9ede4721 Update mock and stub syntax for specs 2015-06-22 12:13:46 +02:00
Robert SpeicherandDmitriy Zaporozhets dad88568f3 Update and simplify Import controller specs 2015-06-22 12:13:46 +02: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
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
Robert Speicher 5c78d7fce8 Move Projects::MergeRequestsController spec to its correct location 2015-06-17 16:37:11 -04: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
Robert Speicher 422236c71e Change foo.should syntax to expect(foo).to in specs 2015-06-13 18:37:30 -04:00
Robert Speicher 1562f017b6 Spec the failure cases for PreferencesController#update 2015-06-13 17:59:12 -04:00
Robert Speicher 94d3c1433d Add RootController
This controller is now the target for `root_url`. It sub-classes
DashboardController so we can render the old default without a redirect
if the user hasn't customized their dashboard location.
2015-06-13 17:59:11 -04:00
Robert Speicher 2bc4fd2d04 Add dashboard attribute to User model 2015-06-13 17:59:11 -04:00
Robert Speicher 821fc4b034 Add Profiles::PreferencesController 2015-06-13 17:58:15 -04:00
Robert Speicher 7b879bb8bd Bump secret key length to 32 2015-05-23 18:47:53 -04:00
Robert Speicher e73ea12695 Add support for manually entering 2FA details 2015-05-23 15:04:40 -04:00
Hannes Rosenögger 1dd0caf4d9 Merge branch 'fix-avatar-removal' into 'master'
Fix bug where avatar filenames were not actually deleted from the database during removal

This would result in a 404 error in certain views.

The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.

Closes #1570

See merge request !620
2015-05-12 14:46:58 +00:00
Robert Speicher 414ddc0021 Clear all 2FA-related fields when user disables the feature 2015-05-09 17:32:49 -04:00
Stan Hu bf4b438459 Fix bug where avatar filenames were not actually deleted from the database during removal.
This would result in a 404 error in certain views.

The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.

Closes #1570
2015-05-07 10:00:35 -07:00
Douwe Maan e9e79fdfdf Merge branch 'fix-escaped-branches-in-compare' into 'master'
Unescape branch names in compare commit

The upgrade in GitLab v7.9 to Rails v4.1.9 caused all branch names in the compare commit mode to be escaped (e.g. `/` to `%2F`). The compare mode would not always work when comparing against branch names with a forward slash.

Opted to unescape the branch name rather than use a wildcard segment to prevent escaping slashes because it seems like a more sensible URL. The slashes in this case aren't really represented by a tree structure (e.g. /compare/one/two/branch..another/branch/here).

* Closes #1399
* Closes https://github.com/gitlabhq/gitlabhq/issues/9105

See merge request !582
2015-05-04 06:58:56 +00:00
Stan Hu ee92dd1683 Unescape branch names in compare commit
Closes #1399
Closes https://github.com/gitlabhq/gitlabhq/issues/9105
2015-04-30 12:44:46 -07:00
Douwe Maan f2cf6d75ec Merge branch 'show-invalid-projects-google-code-import' into 'master'
Show incompatible projects in Google Code import status

Using Google Code import with a JSON file that contained only one Subversion project led to confusion
over whether the system was working. Display the list of valid projects if there are any, and show a list of incompatible projects. Provide tips on how to retain issue data after conversion.

Closes #1531

## Screenshots

Before:

![Screen_Shot_2015-04-29_at_12.46.41_AM](https://gitlab.com/stanhu/gitlab-ce/uploads/16ea5a99cbace48cd2f2c238b5f73f4e/Screen_Shot_2015-04-29_at_12.46.41_AM.png)

After with no projects available (notice the button is hidden):

![Screen_Shot_2015-04-30_at_1.34.38_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/43c612cdcbab181713e5764e2f38a04e/Screen_Shot_2015-04-30_at_1.34.38_AM.png)

After with 1 valid and 1 incompatible project:

![Screen_Shot_2015-04-30_at_1.37.26_AM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b5bcbd304206a996932e5208ef54a071/Screen_Shot_2015-04-30_at_1.37.26_AM.png)

See merge request !586
2015-04-30 17:08:45 +00:00
Stan Hu 9c76a6fa96 Show incompatible projects in Google Code import status
Importing a JSON file with only one Subversion project lead to confusion
over whether the system was working. Provide status why these projects
could not be imported directly.

Closes #1531
2015-04-30 06:56:49 -07:00
Stan Hu 72a7febead Fix "Revspec not found" errors when viewing diffs in a forked project with submodules
Closes #1413
2015-04-27 20:42:38 -07:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Dmitriy Zaporozhets 41f01dd3f4 Merge branch 'haynes/gitlab-ce-remove_access_control_for_images' into 'master'
Remove access control for uploaded images to fix broken images in emails

Replaces !530.

> This MR removes the access control for uploaded images. This is needed to display the images in emails again.
>
> The previous solution to base64 encode the images had to be reverted, because not all email clients supported it.
>
> If possible this should go into the 7.10 release.

See merge request !533
2015-04-20 09:43:01 +00:00
Douwe Maan 1615d3de39 Add tests. 2015-04-17 11:33:58 +02:00
Robert Speicher 3052e89420 Re-fix image rendering for help pages 2015-04-15 12:45:31 -04:00
Douwe Maan 63b21945d2 Merge branch 'google-code-import' into 'master'
Import projects from Google Code.

Resolves #1257.

Issue import logic almost entirely taken from https://gitlab.com/o9000/google-code-to-gitlab ( ♥️ @o9000).

### To do

- [x] List projects from Google Takeout file
- [x] Import Git repository
- [x] Import issues
- [x] Link to correct attachment URL (https://code.google.com/p/support-tools/issues/detail?id=50)
- [x] Handle deleted attachments
- [x] Handle blockedOn attribute
- [x] Add directions on how to get data from Google Takeout

### Import instructions

![Screen_Shot_2015-04-03_at_16.02.21](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4a87038035fbad9441cf613b8cdcc690/Screen_Shot_2015-04-03_at_16.02.21.png)

### Imported issue

![Screen_Shot_2015-04-03_at_16.25.49](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b2c2eaf5ecfcf57b3c48511eb5d26db4/Screen_Shot_2015-04-03_at_16.25.49.png)

See merge request !471
2015-04-15 06:53:42 +00:00
Robert Speicher 167a6b9eef Render a 404 when RefsController#logs_tree gets an HTML request
Fixes #2152
2015-04-06 23:08:28 -04:00
Douwe Maan 7b5bc32cad Allow projects to be imported from Google Code. 2015-04-03 15:29:27 +02:00
Dmitriy Zaporozhets 0d0042d274 Merge branch 'import-current-user' into 'master'
Import GitHub, Bitbucket or GitLab.com projects owned by authenticated user into current namespace.

Addresses #1347.

Untested since I'm in a bit of a hurry. Will definitely have time to test and add unit tests before the 7.10 release :)

See merge request !481
2015-04-02 20:34:52 +00:00
Dmitriy Zaporozhets 424cbf46d5 Merge branch 'repository-archive-worker' into 'master'
Archive repositories in background worker.

Depends on https://gitlab.com/gitlab-org/gitlab_git/merge_requests/17 being merged, a new `gitlab_git` being released and this MR's `Gemfile.lock` being updated..

See private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2173.

To do after this is merged: Update https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/sv-sidekiq-run.erb in omnibus.

See merge request !436
2015-04-02 20:30:55 +00:00
Douwe Maan d92e4ccc6e Add tests. 2015-04-01 17:17:18 +02:00
Dmitriy Zaporozhets dc3b4321ff Merge branch 'group-information-leak' into 'master'
Don't leak private group existence by redirecting from namespace controller to group controller.

See merge request !440
2015-04-01 01:01:38 +00:00
Douwe Maan 91761b0685 Add tests. 2015-03-31 13:37:21 +02:00
Douwe Maan a4608a8dbc Add tests. 2015-03-27 10:27:13 +01:00
Dmitriy Zaporozhets 26053c8705 Add autocomplete controller 2015-03-26 19:06:19 -07:00
Dmitriy Zaporozhets 20a12438ab Fix user controller specs 2015-03-22 11:14:42 -07:00
Hannes Rosenögger 9e5738b007 Extend the commit calendar to show the actual commits for a date 2015-03-18 08:42:42 +01:00
Dmitriy Zaporozhets 1065f3d30b Merge branch 'github-org-repos' into 'master'
Fix missing GitHub organisation repositories on import page.

Private repositories belonging to organizations rather than users can't be imported because `client.repos(org.login)` was requesting `/users/:org_login/repos` (which only returns public org repo's), while we need `/orgs/:org_login/repos` (which includes both public and private). The `client.org_repos` method does this.

cc @marin This is a bug in 7.8.x, but I'm not sure if it needs a minor release now or if it can go in 7.9.

See merge request !1683
2015-03-12 17:13:25 +00:00
Douwe Maan 3175438f02 Fix missing GitHub organisation repositories on import page. 2015-03-12 13:47:15 +01:00
Douwe Maan f5e42f602f Reject access to group/project avatar if the user doesn't have access. 2015-03-10 17:13:02 +01:00
Douwe Maan 3702c4ad80 Render go-import meta tag for private repos. 2015-03-03 11:22:30 +01:00
Stan Hu 4bc5c66fe1 Fix broken project_url routing when protected branches are accessed with an empty repo 2015-03-01 20:26:21 -08:00