Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
app/models/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