Commit Graph
25126 Commits
Author SHA1 Message Date
Zeger-Jan van de Weg fc8d64b3a0 Remove Project#publicish 2016-03-13 19:08:04 +01:00
Zeger-Jan van de Weg 42fcd3881f External Users
The user has the rights of a public user execpt it can never create a project,
 group, or team. Also it cant view internal projects.
2016-03-13 19:08:04 +01:00
Sytse Sijbrandij 065de4ab79 Merge branch 'reduce-example-duplication' into 'master'
Reduce example documentation.

We should not duplicate indexes between the top level and lower level.

See merge request !3162
2016-03-13 01:30:08 +00:00
Sytse Sijbrandij 4e27284a7b Remove duplicate entries. 2016-03-12 17:28:54 -08:00
Douwe Maan e23d6ada1c Merge branch 'revert-5a586f36' into 'master'
Revert "Revert "Merge branch 'support-go-subpackages' into 'master'""

This reverts commit 5a586f364c

See merge request !3194
2016-03-12 21:37:22 +00:00
Stan Hu 74d7de8196 Revert "Revert "Merge branch 'support-go-subpackages' into 'master' ""
This reverts commit 5a586f364c
2016-03-12 21:05:23 +00:00
Douwe Maan 30ab290b28 Merge branch 'remove-goget-spec' into 'master'
Remove unnecessary go-get test (superseded by middleware)



See merge request !3193
2016-03-12 20:50:43 +00:00
Stan Hu 3315fb820b Remove unnecessary go-get test (superseded by middleware) 2016-03-12 11:14:56 -08:00
Douwe Maan 5a586f364c Revert "Merge branch 'support-go-subpackages' into 'master' "
This reverts merge request !3191
2016-03-12 17:42:51 +00:00
Douwe Maan 826bc72c12 Merge branch 'support-go-subpackages' into 'master'
Support Golang subpackage fetching

Closes #13805

See merge request !3191
2016-03-12 17:38:08 +00:00
Dmitriy Zaporozhets a3b626bf25 Merge branch 'projects-finder-ee-compatible' into 'master'
Removed User#project_relations

This is to make things more compatible with EE so merging is easier.

cc @dzaporozhets 

See merge request !3192
2016-03-12 16:50:51 +00:00
Stan Hu 380a67ad4c Ensure PATH_INFO exists for go-get 2016-03-12 08:10:54 -08:00
Stan Hu b23a05d09b Add spec for go-import middleware 2016-03-12 08:10:38 -08:00
Stan Hu bb206f947f Simplify code 2016-03-12 07:50:02 -08:00
Stan Hu 2563213ccf Remove existing go_import.html.haml implementation 2016-03-12 07:49:16 -08:00
Yorick Peterse 3b76b73ab1 Removed User#project_relations
GitLab EE adds an extra relation that selects a "project_id" column
instead of an "id" column, making it very hard for this method to be
re-used in EE. Since using User#authorized_groups in
ProjectsFinder#all_groups apparently has no performance impact we can
just use it and keep everything compatible with EE.
2016-03-12 15:44:48 +01:00
Douwe Maan f979b4a2c8 Merge branch 'filter-import-url' into 'master'
Filter import_url params because they may contain auth information. Fixes #14199

cc @dzaporozhets @DouweM tagging you since this is security related.

See merge request !3174
2016-03-12 14:08:48 +00:00
Douwe Maan ff62e20607 Merge branch 'fix-gh-pr-import' into 'master'
Fix importing PR's from GitHub when the source repo was removed

Closes #13847 
Closes gitlab-com/support-forum#584

See merge request !3172
2016-03-12 14:07:45 +00:00
Douwe Maan 8ee1c0ffe5 Merge branch 'rs-disallow-blank-line-code' into 'master'
Disallow blank (non-null) values for a Note's `line_code` attribute

It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.

See merge request !3118
2016-03-12 14:01:06 +00:00
Douwe Maan 0dae842005 Merge branch 'ignore-byebug-history' into 'master'
Ignore .byebug_history

This allows me to use `git add .` without problems and retain all my history of `byebug`

What do you think @DouweM?

See merge request !3145
2016-03-12 13:04:11 +00:00
Douwe Maan 34e8c56236 Merge branch 'fix/token-timing-attack' into 'master'
fix token issue - timing attack

Updates token comparisons to use a secure version instead of `==`

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13617

See merge request !3062
2016-03-12 12:14:32 +00:00
Douwe Maan 2b9b07891c Merge branch 'nico-de-ceulaer/gitlab-ce-13865-handle-other-emails-for-avatar-lookup'
# Conflicts:
#	app/helpers/application_helper.rb
2016-03-12 13:12:40 +01:00
Stan Hu cc065fbeaa Support Golang subpackage fetching
Closes #13805
2016-03-12 01:09:37 -08:00
Jacob Schatz 491d0ae1c3 Merge branch 'fix_responsive_layout_bug' into 'master'
Fix responsive bug top navigation

Hi,

I have found and fixed a minor layout bug (responsive)

This is the situation before the fix:
![before](/uploads/55bf61a64fb49a763c5f8381bf46d390/before.png)

And this is the situation after the fix:
![after](/uploads/33ba091156d404e52c41f134121c59f0/after.png)

See merge request !3190
2016-03-11 22:58:14 +00:00
Robert Speicher 01f6db4f64 Disallow blank (non-null) values for a Note's line_code attribute
It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.
2016-03-11 17:46:50 -05: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
Robert Speicher 70bf6dc702 Merge branch 'trigram-index-searching' into 'master'
Refactor searching and use PostgreSQL trigram indexes for significantly
improved performance

Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/13743.

Also fixes #12410

See merge request !2987
2016-03-11 21:46:07 +00:00
Dennis van de Hoef e932a4164f Fix responsive bug top navigation 2016-03-11 22:34:51 +01:00
Yorick PeterseandRobert Speicher 67143e25a2 More detailed trigram migration error message
This explains the user what they need to run and where to go in case
they want to learn more about "CREATE EXTENSION".
2016-03-11 15:26:32 -05:00
Yorick PeterseandRobert Speicher 4f3fa519c6 Use a UNION in MergeRequest.in_projects
The OR condition for source_project_id/target_project_id leads to a
query plan that performs rather poorly on PostgreSQL due to the use of
sub-queries. Because Rails offers no easy alternative for this
particular problem we're forced to using a UNION for both conditions.
The resulting query performs much faster than just using an OR.
2016-03-11 15:26:32 -05:00
Yorick PeterseandRobert Speicher c2df121f8e Added changelog entry for search performance 2016-03-11 15:26:32 -05:00
Yorick PeterseandRobert Speicher 0ba20457fb Added pg_trgm to the PostgreSQL requirements 2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher 78244ffcbf Corrected spec title for Namespace.search 2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher ee75c49313 Make Namespace.search case-insensitive
This ensures searching namespaces works exactly the same as searching
for any other resource.
2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher d7d5937531 Removed arel_table receiver from search methods
We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 0ab9571ad7 Fixed a few spec typos 2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 9e00a23716 Clean up ProjectsFinder for getting user projects
We don't need the extra layer of nesting of UNION queries here (as
User#authorized_projects already returns a UNION'd query).
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher b77b3b16b6 Removed order from sub-query projects for search
There's no need to order queries used as sub-queries and doing so can
add potential overhead.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 8c2868e8ea Added ProjectSearchResults#project_ids_relation
This ensures some other methods such as the "issues" method still work.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 300332bbf6 Fixed ProjectSearchResults spec to use a Project
This spec was still passing an ID to the #initialize method instead of
a Project instance.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 12082db41e Disable Rubocop for PostgreSQL patches
This code is mostly a copy-paste from existing pull requests so there's
no point in running Rubocop on it.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher d38dcf1e3b Patch MySQL to ignore PostgreSQL schema options
This ensures that options such as `using: :gin` and PostgreSQL operator
classes are ignored when loading a schema into a MySQL database.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 2080fd395c Updated schema to include Pg operator classes
This also includes e.g. the appearances table which apparently wasn't
already included in the schema.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 49e122df85 Backport Rails support for PostgreSQL opclasses
This is needed to support creating/dumping/loading indexes that use the
gin_trgm_ops operator class on PostgreSQL. These changes are taken from
Rails pull request https://github.com/rails/rails/pull/19090.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher ec349dc1b6 Refactor Gitlab::ProjectSearchResults
Previously this class would be given a project ID which was then used to
retrieve the corresponding Project object. However, in all cases the
Project object was already known as it was used to grab the ID to pass
to ProjectSearchResults. By just passing a Project instead we remove the
need for an extra query as well as the need for some other complexity
in this class.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 42fde69d39 Refactor Gitlab::SnippetSearchResults
This removes the need for plucking snippet IDs into memory.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 2cf7f3f410 Use ILIKE/LIKE for searching milestones 2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 87e7c3e132 Use ILIKE/LIKE for Issuable.search and full_search 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 2076bdb62e Use ILIKE/LIKE for searching CI runners 2016-03-11 15:25:21 -05:00