BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9747f3ef
Commit
9747f3ef
authored
Sep 21, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default values for ProjectFeature
Closes gitlab-org/gitlab-ce#22330
parent
c2a7e7b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
project_feature.rb
app/models/project_feature.rb
+7
-0
No files found.
app/models/project_feature.rb
View file @
9747f3ef
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment