test if we can :read_group the group, not the namespace

This commit is contained in:
http://jneen.net/ 2016-08-22 17:45:15 -07:00
parent 2bdcef4d67
commit 6070145beb
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class NamespacesController < ApplicationController
if user
redirect_to user_path(user)
elsif group && can?(current_user, :read_group, namespace)
elsif group && can?(current_user, :read_group, group)
redirect_to group_path(group)
elsif current_user.nil?
authenticate_user!