Commit a83a80ed authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by Grzegorz Bizon

Check permission of details

parent 1b6c2c3c
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment