Commit 5b091c764c6e04df1091eb333fc34a44226b5869
Exists in
master
and in
4 other branches
Merge pull request #5512 from jhollingsworth/feature/missing-group-500-fix
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 | - Show branches list (which branches contains commit) on commit page (Andrew Kumanyaev) |
7 | 7 | - Security improvements |
8 | 8 | - Added support for GitLab CI 4.0 |
9 | + - Fixed issue with 500 error when group did not exist | |
9 | 10 | |
10 | 11 | v 6.2.0 |
11 | 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 | 102 | |
103 | 103 | # Dont allow unauthorized access to group |
104 | 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 | 106 | return render_404 |
107 | 107 | end |
108 | 108 | end | ... | ... |