Commit graph

5 commits

Author SHA1 Message Date
Yorick Peterse
73bf9413b9
Refactor Project.with_feature_available_for_user
This method used to use a UNION, which would lead to it performing the
same query twice; producing less than ideal performance. Further, in
certain cases ActiveRecord could get confused and mess up the variable
bindings, though it's not clear how/why exactly this happens.

Fortunately we can work around all of this by building some of the WHERE
conditions manually, allowing us to use a simple OR statement to get all
the data we want without any of the above problems.
2017-06-16 13:49:09 +02:00
Semyon Pupkov
3deb66ea56 Add traits for ProjectFeatures to Project factory
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-02-05 13:11:45 +05:00
Robert Speicher
fcb37542e7 Use :empty_project where possible in model specs 2017-01-26 17:44:59 -05:00
Felipe Artur
da07c2e4d3 Add visibility level to project repository 2016-10-17 18:12:18 -02:00
Felipe Artur
892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00