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
4e7eb309
Commit
4e7eb309
authored
Sep 21, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-default-setting-features' into 'master'
Add default values for ProjectFeature See merge request !6447
parents
b3efa397
95730019
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app/models/project_feature.rb
app/models/project_feature.rb
+6
-0
No files found.
app/models/project_feature.rb
View file @
4e7eb309
...
@@ -22,6 +22,12 @@ class ProjectFeature < ActiveRecord::Base
...
@@ -22,6 +22,12 @@ class ProjectFeature < ActiveRecord::Base
belongs_to
:project
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
)
def
feature_available?
(
feature
,
user
)
raise
ArgumentError
,
'invalid project feature'
unless
FEATURES
.
include?
(
feature
)
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