diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-05 09:39:16 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-09 03:12:02 +0300 |
commit | 5e3733da3773f187c5a8c20c26f9d5c0432dea57 (patch) | |
tree | 52a1b4e8c693a6a350e84aa5a5482453d35fa8d8 /app/models | |
parent | 86ca1a77c58b508fc1b037c5fffbfb22fd992b42 (diff) |
Get GITLAB_FEATURES from Project#licensed_features instead of Namespace#features (#5320)
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/build.rb | 2 | ||||
-rw-r--r-- | app/models/namespace.rb | 4 | ||||
-rw-r--r-- | app/models/project.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 4aa65bf4273..3ee46453334 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -611,7 +611,7 @@ module Ci Gitlab::Ci::Variables::Collection.new.tap do |variables| variables.append(key: 'CI', value: 'true') variables.append(key: 'GITLAB_CI', value: 'true') - variables.append(key: 'GITLAB_FEATURES', value: project.namespace.features.join(',')) + variables.append(key: 'GITLAB_FEATURES', value: project.licensed_features.join(',')) variables.append(key: 'CI_SERVER_NAME', value: 'GitLab') variables.append(key: 'CI_SERVER_VERSION', value: Gitlab::VERSION) variables.append(key: 'CI_SERVER_REVISION', value: Gitlab::REVISION) diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 2b63aa33222..c29a53e5ce7 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -248,10 +248,6 @@ class Namespace < ActiveRecord::Base all_projects.with_storage_feature(:repository).find_each(&:remove_exports) end - def features - [] - end - def refresh_project_authorizations owner.refresh_authorized_projects end diff --git a/app/models/project.rb b/app/models/project.rb index 3f805dd1fc9..ff4ea25987c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1875,6 +1875,10 @@ class Project < ActiveRecord::Base memoized_results[cache_key] end + def licensed_features + [] + end + private def storage |