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
b63c08b2
Commit
b63c08b2
authored
Aug 25, 2017
by
Rubén Dávila
Committed by
Mike Greiling
Aug 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build Project in context of Namespace if available
parent
b7b49c4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+10
-1
No files found.
app/controllers/projects_controller.rb
View file @
b63c08b2
...
...
@@ -3,6 +3,7 @@ class ProjectsController < Projects::ApplicationController
include
ExtractsPath
before_action
:authenticate_user!
,
except:
[
:index
,
:show
,
:activity
,
:refs
]
before_action
:namespace
,
only:
[
:new
]
before_action
:project
,
except:
[
:index
,
:new
,
:create
]
before_action
:repository
,
except:
[
:index
,
:new
,
:create
]
before_action
:assign_ref_vars
,
only:
[
:show
],
if: :repo_exists?
...
...
@@ -20,7 +21,7 @@ class ProjectsController < Projects::ApplicationController
end
def
new
@project
=
Project
.
new
build_project
end
def
edit
...
...
@@ -395,4 +396,12 @@ class ProjectsController < Projects::ApplicationController
def
project_export_enabled
render_404
unless
current_application_settings
.
project_export_enabled?
end
def
namespace
@namespace
||=
Namespace
.
find
(
params
[
:namespace_id
])
if
params
[
:namespace_id
].
present?
end
def
build_project
@project
||=
namespace
?
namespace
.
projects
.
new
:
Project
.
new
end
end
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