Commit Graph

17 Commits

Author SHA1 Message Date
GitLab Bot 95793b2325 Add latest changes from gitlab-org/gitlab@master 2019-10-02 09:05:53 +00:00
Krasimir Angelov 5374f42320 Add tests for ProjectFeature's #public_pages? and #private_pages? 2019-09-11 14:25:21 +12:00
Andreas Brandl 988dc80585
Further remove code branches by database type
We dropped MySQL support and a lot of mysql specific code has been
removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608.

This comes in from the other direction and removes any `if postgresql?`
branches.
2019-07-29 12:47:06 +02:00
Vladimir Shushlin 6796dcf277 Fix wrong pages access level default
- Set access level in before_validation hook
- Add post migration for updating existing project_features
2019-07-17 12:56:58 +00:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Tuomo Ala-Vannesluoma c84b60b164 Make GitLab pages support access control 2018-10-05 13:41:11 +00:00
Robert Speicher 9394678858
Add ProjectFeature check for feature flag
This will allow an explicitly-disabled feature flag to override a
feature being available for a project.

As an extreme example, we could quickly disable issues across all
projects at runtime by running `Feature.disable(:issues)`.
2018-10-04 14:08:21 -05:00
Valery Sizov 15d011d64d Geo: sync disabled wikis. Stage 2
We started syncing all the wiki regardless of the fact it's disabled or
not. We couldn't do that in one stage because of needing of smoth update
and deprecating things. This is the second stage that finally removes
unused columns in the geo_node_status table.
2018-09-25 17:49:39 +03:00
Gabriel Mazetto c084e87ad7 Added SiteStatistics as counter cache for Projects and Wikis 2018-07-24 18:44:07 +02:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
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