BigW Consortium Gitlab

Commit 609bc0a0 by Kamil Trzcinski

Check permission of details

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