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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
be613de2
Commit
be613de2
authored
May 14, 2016
by
Zeger-Jan van de Weg
Committed by
Stan Hu
May 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project#show on projects pending deletion will 404
fixes #17508
parent
f9bb9151
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+11
-0
No files found.
CHANGELOG
View file @
be613de2
...
@@ -11,6 +11,7 @@ v 8.9.0 (unreleased)
...
@@ -11,6 +11,7 @@ v 8.9.0 (unreleased)
- Fix issues filter when ordering by milestone
- Fix issues filter when ordering by milestone
- Todos will display target state if issuable target is 'Closed' or 'Merged'
- Todos will display target state if issuable target is 'Closed' or 'Merged'
- Remove 'main language' feature
- Remove 'main language' feature
- Projects pending deletion will render a 404 page
- Measure queue duration between gitlab-workhorse and Rails
- Measure queue duration between gitlab-workhorse and Rails
v 8.8.3
v 8.8.3
...
...
app/controllers/projects/application_controller.rb
View file @
be613de2
...
@@ -26,7 +26,7 @@ class Projects::ApplicationController < ApplicationController
...
@@ -26,7 +26,7 @@ class Projects::ApplicationController < ApplicationController
project_path
=
"
#{
namespace
}
/
#{
id
}
"
project_path
=
"
#{
namespace
}
/
#{
id
}
"
@project
=
Project
.
find_with_namespace
(
project_path
)
@project
=
Project
.
find_with_namespace
(
project_path
)
if
@project
&&
can?
(
current_user
,
:read_project
,
@project
)
if
can?
(
current_user
,
:read_project
,
@project
)
&&
!
@project
.
pending_delete?
if
@project
.
path_with_namespace
!=
project_path
if
@project
.
path_with_namespace
!=
project_path
redirect_to
request
.
original_url
.
gsub
(
project_path
,
@project
.
path_with_namespace
)
redirect_to
request
.
original_url
.
gsub
(
project_path
,
@project
.
path_with_namespace
)
end
end
...
...
spec/controllers/projects_controller_spec.rb
View file @
be613de2
...
@@ -115,6 +115,17 @@ describe ProjectsController do
...
@@ -115,6 +115,17 @@ describe ProjectsController do
expect
(
public_project_with_dot_atom
).
not_to
be_valid
expect
(
public_project_with_dot_atom
).
not_to
be_valid
end
end
end
end
context
'when the project is pending deletions'
do
it
'renders a 404 error'
do
project
=
create
(
:project
,
pending_delete:
true
)
sign_in
(
user
)
get
:show
,
namespace_id:
project
.
namespace
.
path
,
id:
project
.
path
expect
(
response
.
status
).
to
eq
404
end
end
end
end
describe
"#update"
do
describe
"#update"
do
...
...
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