Commit 9747f3ef authored by Z.J. van de Weg's avatar Z.J. van de Weg

Add default values for ProjectFeature

Closes gitlab-org/gitlab-ce#22330
parent c2a7e7b8
......@@ -22,6 +22,13 @@ class ProjectFeature < ActiveRecord::Base
belongs_to :project
default_value_for :builds_access_level, value: ENABLED, allows_nil: false
default_value_for :merge_requests_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