diff options
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index c45338bf4eb..16b68453f5c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -34,6 +34,8 @@ require 'file_size_validator' class Project < ActiveRecord::Base include Sortable + include Gitlab::CurrentSettings + extend Gitlab::CurrentSettings include Gitlab::ShellAdapter include Gitlab::VisibilityLevel include Gitlab::ConfigHelper @@ -132,8 +134,8 @@ class Project < ActiveRecord::Base validates :issues_enabled, :merge_requests_enabled, :wiki_enabled, inclusion: { in: [true, false] } validates :visibility_level, - exclusion: { in: gitlab_config.restricted_visibility_levels }, - if: -> { gitlab_config.restricted_visibility_levels.any? } + exclusion: { in: current_application_settings.restricted_visibility_levels }, + if: -> { current_application_settings.restricted_visibility_levels.any? } validates :issues_tracker_id, length: { maximum: 255 }, allow_blank: true validates :namespace, presence: true validates_uniqueness_of :name, scope: :namespace_id |