Commit Graph
303 Commits
Author SHA1 Message Date
Elias Werberich c3a98d8fcc Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences.
Fixes #14585.
2016-03-24 19:59:54 +01:00
Douwe Maan 703f7c5d57 Merge branch 'fix-sorting-by-votes-on-groups-page' into 'master'
Fix sorting issues/mrs by votes on the groups page

Closes #14394 

The `non_archived` scope applied here https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/concerns/issues_action.rb#L5 overrides the previous `ORDER BY` applied inside the IssuesFinder, with the default scope of the Project model, resulting in SQL errors.

```ruby
Issue.reorder(created_at: :desc).joins(:project).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id
    ORDER BY issues.created_at DESC"

Issue.reorder(created_at: :desc).joins(:project).merge(Project.non_archived).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id 
    WHERE projects.archived = 'f'
    ORDER BY projects.id DESC"

Issue.reorder(created_at: :desc).joins(:project).merge(Project.non_archived.only(:where)).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id 
    WHERE projects.archived = 'f'
    ORDER BY issues.created_at DESC"
```

/cc @yorickpeterse 

See merge request !3333
2016-03-23 10:35:54 +00:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Douglas Barbosa Alexandre 100e3e7601 Fix sorting issues/mrs by votes on the groups page
The `non_archived` scope applied here
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/conc
erns/issues_action.rb#L5 overrides the previous `ORDER BY` applied
inside the IssuesFinder, with the default scope of the Project model,
resulting in SQL errors.
2016-03-21 17:01:38 -03:00
Zeger-Jan van de Weg 6e5461c6ee Merge branch 'master' into 2489-soft-delete-issues 2016-03-21 19:32:37 +01:00
Zeger-Jan van de Weg d28a587e82 Fix typos and denting 2016-03-21 19:30:45 +01:00
Zeger-Jan van de Weg 3b088fc5b5 Minor improvements on IssuableActions 2016-03-21 16:59:35 +01:00
Douwe Maan 261569b246 Fix specs 2016-03-21 09:09:59 +01:00
Douwe Maan 19aa20d528 Fix more specs 2016-03-20 23:09:33 +01:00
Douwe Maan 7c51d5efec Fix some specs 2016-03-20 22:55:08 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Douwe Maan 2eb19ea3ea Merge branch 'master' into issue_12658 2016-03-20 14:57:25 +01:00
Yorick Peterse 295fdf720a Create repositories in IssuesController specs
In the real world a project always has a repository. This fact allows
code such as Issue#related_branches to work without explicitly checking
if a repository exists.
2016-03-19 21:54:08 +01:00
Zeger-Jan van de Weg 1d77822816 minor improvements and fixed specs 2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg 7342a4566c Dry destroy action on issuables 2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg 212e83bab3 Soft delete issuables 2016-03-19 21:23:03 +01:00
Felipe Artur 8b830b8c3b Fix specs 2016-03-18 21:04:53 -03:00
Douglas Barbosa Alexandre 34ee75379c Restrict access to confidential issues 2016-03-17 20:55:38 -03:00
Felipe Artur 44c127447b Merge 4009-external-users into issue_12658 2016-03-16 20:16:42 -03:00
Zeger-Jan van de Weg 2b97c92119 Incorporate review 2016-03-15 20:21:11 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg ad97bebfed Enhance new branch button on an issue 2016-03-15 20:21:11 +01:00
Rémy Coutable 1714883107 Revert "Merge branch 'avatar-cropping' into 'master' "
This reverts commit 01160fc061, reversing
changes made to 4bff9daf8b.
2016-03-15 14:55:40 +01:00
Marin Jankovski 90c10f4dab Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-03-14 11:40:17 +01:00
Zeger-Jan van de Weg 5352ec2e21 Fix denting and spec 2016-03-13 13:44:31 +01:00
Stan Hu 3315fb820b Remove unnecessary go-get test (superseded by middleware) 2016-03-12 11:14:56 -08:00
Douwe Maan cb81c8a5ef Merge branch 'rs-issue-12944' into 'master'
Use a custom Devise failure app to handle unauthenticated .zip requests

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/12944

See merge request !2828
2016-03-11 22:34:33 +00:00
Felipe Artur c3e70280df Prevent projects to have higher visibility than groups
Prevent Groups to have smaller visibility than projects
Add default_group_visibility_level to configuration
Code improvements
2016-03-10 10:38:36 -03:00
Felipe Artur bd59e59d01 Add visibility level icon and a couple of specs 2016-03-10 10:38:36 -03:00
Robert Speicher 5844a21a0a Use a custom Devise failure app to handle unauthenticated .zip requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/12944
2016-03-08 23:49:30 -05:00
Robert Speicher b900304c38 Make better use of the visibility_level factory traits 2016-03-08 16:40:45 -05:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Douwe Maan 1cb4f810a5 Merge branch 'issue_13648' into 'master'
Reuse query from ProjectsFinder to get projects accessible to current user.

Fixes #13648

This is a refactor to reuse the existing query from our `ProjectsFinder` class

See merge request !3049
2016-03-03 14:28:25 +00:00
Rubén Dávila 49e4ef3b41 Add specs to ForksController#index.
* Also refactor query to get projects accessible for current user.
  ProjectsFinder actually return public projects when no user is passed.
2016-03-02 12:35:56 -05:00
Douwe Maan 386d442a18 Merge branch 'fix/deprecated-ci-badge-permissions' into 'master'
Fix permissions for deprecated CI build status badge

This fixes permissions for deprecated status badge, being unavailable even if project is public.

Closes #13324

See merge request !3030
2016-03-02 11:00:25 +00:00
Grzegorz Bizon 8b02d962ab Do not require authentication for CI status badge
This changes only deprecated CI badge that we keep for backwards
compatibility. See !3030#note_4041498.
2016-03-01 20:32:30 +01:00
Grzegorz Bizon 6be22dbbe3 Fix specs for deprecated CI build status badge 2016-03-01 14:42:52 +01:00
Grzegorz Bizon 814d853a1a Fix deprecated CI build status badge permissions 2016-03-01 13:59:19 +01:00
James Lopez 8fe72af3dc Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/contributions-forked-projects 2016-02-29 15:49:00 +01:00
Robert Speicher 93e6282657 Add :with_avatar trait to User factory 2016-02-24 13:50:03 -05:00
Robert SpeicherandRémy Coutable e6195b859f Merge branch 'fix-autocomplete-spec' into 'master'
Fix volatile spec.

Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/312.

See merge request !206
2016-02-23 10:11:39 +01:00
James Lopez 303e9eb5bf include contributions from forked projects on profile calendar 2016-02-22 15:46:29 +01:00
Douwe Maan 0c5abb1e0b Merge branch 'rs-move-controller-specs' into 'master'
Move a few controller specs to their correct locations



See merge request !2889
2016-02-20 01:12:59 +00:00
Rubén DávilaandRobert Speicher b8295fc323 Fix build and add specs 2016-02-19 13:14:53 -05:00
Robert Speicher dfca5bfa47 Move a few controller specs to their correct locations 2016-02-18 21:50:49 -05:00
Rubén Dávila 2770de9617 Reopened MRs should also be considered as open. 2016-02-17 21:15:13 -05:00
Douwe Maan 879d66b6ab Merge branch 'git-archive-refactor' into 'master'
Refactor 'git archive' hand-off to gitlab-workhorse

We have a nicer way now to hand off HTTP responses to gitlab-workhorse.

Companion MR: https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/36

See merge request !2675
2016-02-17 17:16:34 +00:00
Rémy Coutable 3d3ac87af9 Redirect /import to project page if no importing at all and repo exists
Fixes #13367.
2016-02-17 15:05:44 +01:00
Jacob Vosmaer a0ccb0731b Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into git-archive-refactor 2016-02-17 11:30:42 +01:00
Robert Speicher f5ab126fd0 Ensure Commit#show responds 404 instead of 500 when given an invalid ID
Closes #13467
2016-02-15 15:48:16 -05:00
Robert Speicher 551ce0f245 Add spec for assigning view param from cookie 2016-02-05 16:03:20 -05:00