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
bffa1e65
Commit
bffa1e65
authored
Apr 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect feature settings submitted via api
parent
42dc33e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
create_context.rb
app/contexts/projects/create_context.rb
+12
-8
No files found.
app/contexts/projects/create_context.rb
View file @
bffa1e65
...
...
@@ -8,7 +8,18 @@ module Projects
# get namespace id
namespace_id
=
params
.
delete
(
:namespace_id
)
@project
=
Project
.
new
(
params
)
# Load default feature settings
default_features
=
Gitlab
.
config
.
gitlab
.
default_projects_features
default_opts
=
{
issues_enabled:
default_features
.
issues
,
wiki_enabled:
default_features
.
wiki
,
wall_enabled:
default_features
.
wall
,
snippets_enabled:
default_features
.
snippets
,
merge_requests_enabled:
default_features
.
merge_requests
}
@project
=
Project
.
new
(
default_opts
.
merge
(
params
))
# Parametrize path for project
#
...
...
@@ -32,13 +43,6 @@ module Projects
@project
.
namespace_id
=
current_user
.
namespace_id
end
# Disable less important features by default
@project
.
issues_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
issues
@project
.
wiki_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
wiki
@project
.
wall_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
wall
@project
.
snippets_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
snippets
@project
.
merge_requests_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
merge_requests
@project
.
creator
=
current_user
# Import project from cloneable resource
...
...
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