提交 609bc0a0 编写于 作者: K Kamil Trzcinski

Check permission of details

上级 82ee1d29
......@@ -3,8 +3,8 @@ module Gitlab
module Status
module Build
module Common
def has_details?
true
def has_details?(current_user)
can?(current_user, :read_build, subject)
end
def details_path
......
......@@ -33,7 +33,7 @@ module Gitlab
self.class.name.demodulize.downcase.underscore
end
def has_details?
def has_details?(_user = nil)
false
end
......
......@@ -3,8 +3,8 @@ module Gitlab
module Status
module Pipeline
module Common
def has_details?
true
def has_details?(current_user)
can?(current_user, :read_pipeline, subject)
end
def details_path
......
......@@ -3,8 +3,8 @@ module Gitlab
module Status
module Stage
module Common
def has_details?
true
def has_details?(current_user)
can?(current_user, :read_pipeline, subject)
end
def details_path
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册