Fixes 500 error when user types in wrong group name.

This commit is contained in:
Jason Hollingsworth 2013-11-01 11:29:37 -05:00
parent 4c47a89fa5
commit dfe19b2b84
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ v 6.3.0
- Show branches list (which branches contains commit) on commit page (Andrew Kumanyaev)
- Security improvements
- Added support for GitLab CI 4.0
- Fixed issue with 500 error when group did not exist
v 6.2.0
- Public project pages are now visible to everyone (files, issues, wik, etc.)

View File

@ -102,7 +102,7 @@ class GroupsController < ApplicationController
# Dont allow unauthorized access to group
def authorize_read_group!
unless projects.present? or can?(current_user, :read_group, @group)
unless @group and (projects.present? or can?(current_user, :read_group, @group))
return render_404
end
end