Commit d0f5d9a1 authored by Robert Speicher's avatar Robert Speicher Committed by Ruben Davila

Merge branch 'zj-default-setting-features' into 'master'

Add default values for ProjectFeature

See merge request !6447
parent 182de594
......@@ -22,6 +22,12 @@ class ProjectFeature < ActiveRecord::Base
belongs_to :project
default_value_for :builds_access_level, value: ENABLED, allows_nil: false
default_value_for :issues_access_level, value: ENABLED, allows_nil: false
default_value_for :merge_requests_access_level, value: ENABLED, allows_nil: false
default_value_for :snippets_access_level, value: ENABLED, allows_nil: false
default_value_for :wiki_access_level, value: ENABLED, allows_nil: false
def feature_available?(feature, user)
raise ArgumentError, 'invalid project feature' unless FEATURES.include?(feature)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment