diff options
| author | Vinnie Okada <vokada@mrvinn.com> | 2015-03-07 11:23:43 -0700 |
|---|---|---|
| committer | Vinnie Okada <vokada@mrvinn.com> | 2015-03-08 16:10:05 -0600 |
| commit | 285c5341855f8af6cbea5e964e3104a4698fa450 (patch) | |
| tree | a73054190f441edcda4c33715c7822caeb7800ed /app/models/project.rb | |
| parent | cacac147de2b317d02788c5da1cdc6010f00a340 (diff) | |
| download | gitlab-ce-285c5341855f8af6cbea5e964e3104a4698fa450.tar.gz | |
Allow admins to override restricted visibility
Allow admins to use restricted visibility levels when creating or
updating projects.
Diffstat (limited to 'app/models/project.rb')
| -rw-r--r-- | app/models/project.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 16b68453f5c..dae2b6425c4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -34,8 +34,6 @@ 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 @@ -133,9 +131,6 @@ class Project < ActiveRecord::Base message: Gitlab::Regex.path_regex_message } validates :issues_enabled, :merge_requests_enabled, :wiki_enabled, inclusion: { in: [true, false] } - validates :visibility_level, - 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 |
