Commit dfe19b2b84498af2eb0c7e401fda8f9eddfd0f46
1 parent
4c47a89f
Exists in
master
and in
4 other branches
Fixes 500 error when user types in wrong group name.
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
CHANGELOG
@@ -6,6 +6,7 @@ v 6.3.0 | @@ -6,6 +6,7 @@ v 6.3.0 | ||
6 | - Show branches list (which branches contains commit) on commit page (Andrew Kumanyaev) | 6 | - Show branches list (which branches contains commit) on commit page (Andrew Kumanyaev) |
7 | - Security improvements | 7 | - Security improvements |
8 | - Added support for GitLab CI 4.0 | 8 | - Added support for GitLab CI 4.0 |
9 | + - Fixed issue with 500 error when group did not exist | ||
9 | 10 | ||
10 | v 6.2.0 | 11 | v 6.2.0 |
11 | - Public project pages are now visible to everyone (files, issues, wik, etc.) | 12 | - Public project pages are now visible to everyone (files, issues, wik, etc.) |
app/controllers/groups_controller.rb
@@ -102,7 +102,7 @@ class GroupsController < ApplicationController | @@ -102,7 +102,7 @@ class GroupsController < ApplicationController | ||
102 | 102 | ||
103 | # Dont allow unauthorized access to group | 103 | # Dont allow unauthorized access to group |
104 | def authorize_read_group! | 104 | def authorize_read_group! |
105 | - unless projects.present? or can?(current_user, :read_group, @group) | 105 | + unless @group and (projects.present? or can?(current_user, :read_group, @group)) |
106 | return render_404 | 106 | return render_404 |
107 | end | 107 | end |
108 | end | 108 | end |