Rename user_can_read_group?
to user_can_reference_group?
This commit is contained in:
parent
a803cd51eb
commit
62282971e0
1 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ module Gitlab
|
|||
%(<a href="#{url}" class="#{klass}">@#{user}</a>)
|
||||
elsif namespace = Namespace.find_by(path: user)
|
||||
if namespace.is_a?(Group)
|
||||
if user_can_read_group?(namespace)
|
||||
if user_can_reference_group?(namespace)
|
||||
url = group_url(user, only_path: context[:only_path])
|
||||
%(<a href="#{url}" class="#{klass}">@#{user}</a>)
|
||||
else
|
||||
|
@ -117,7 +117,7 @@ module Gitlab
|
|||
only_path: context[:only_path])
|
||||
end
|
||||
|
||||
def user_can_read_group?(group)
|
||||
def user_can_reference_group?(group)
|
||||
return false if context[:current_user].blank?
|
||||
Ability.abilities.allowed?(context[:current_user], :read_group, group)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue