Skip to content
Snippets Groups Projects
Commit 9ad75248 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Wes Gurney
Browse files

Fix 404 if Group guest visit empty group page

parent 7b996818
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
Loading
Loading
@@ -110,7 +110,7 @@ class GroupsController < ApplicationController
 
# Dont allow unauthorized access to group
def authorize_read_group!
unless projects.present? or can?(current_user, :manage_group, @group)
unless projects.present? or can?(current_user, :read_group, @group)
return render_404
end
end
Loading
Loading
Loading
Loading
@@ -135,6 +135,10 @@ class Ability
def group_abilities user, group
rules = []
 
if group.users.include?(user)
rules << :read_group
end
# Only group owner and administrators can manage group
if group.owners.include?(user) || user.admin?
rules << [
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