Skip to content
Snippets Groups Projects
Commit 56538f9c authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'fix/unexistent-group-500' into 'master'

Return a 404 instead of a 500 when accessing a non-existent group

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3352

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/5600

See merge request !2614
parents 4dea2682 afde800b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,6 +8,7 @@ v 8.5.0 (unreleased)
- Fix diff comments loaded by AJAX to load comment with diff in discussion tab
- Whitelist raw "abbr" elements when parsing Markdown (Benedict Etzel)
- Don't vendor minified JS
- Display 404 error on group not found
- Track project import failure
- Fix visibility level text in admin area (Zeger-Jan van de Weg)
- Update the ExternalIssue regex pattern (Blake Hitchcock)
Loading
Loading
Loading
Loading
@@ -82,6 +82,7 @@ class GroupsController < Groups::ApplicationController
 
def group
@group ||= Group.find_by(path: params[:id])
@group || render_404
end
 
def load_projects
Loading
Loading
Loading
Loading
@@ -3,6 +3,10 @@ Feature: Groups
Given I sign in as "John Doe"
And "John Doe" is owner of group "Owned"
 
Scenario: I should not see a group if it does not exist
When I visit group "NonExistentGroup" page
Then page status code should be 404
Scenario: I should have back to group button
When I visit group "Owned" page
Then I should see back to dashboard button
Loading
Loading
Loading
Loading
@@ -120,6 +120,10 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
expect(page).to have_xpath("//span[@class='label label-warning']", text: 'archived')
end
 
step 'I visit group "NonExistentGroup" page' do
visit group_path(-1)
end
private
 
def assigned_to_me(key)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment