BigW Consortium Gitlab

Commit a83a80ed by Kamil Trzcinski Committed by Grzegorz Bizon

Check permission of details

parent 1b6c2c3c
...@@ -3,8 +3,8 @@ module Gitlab ...@@ -3,8 +3,8 @@ module Gitlab
module Status module Status
module Build module Build
module Common module Common
def has_details? def has_details?(current_user)
true can?(current_user, :read_build, subject)
end end
def details_path def details_path
......
...@@ -33,7 +33,7 @@ module Gitlab ...@@ -33,7 +33,7 @@ module Gitlab
self.class.name.demodulize.downcase.underscore self.class.name.demodulize.downcase.underscore
end end
def has_details? def has_details?(_user = nil)
false false
end end
......
...@@ -3,8 +3,8 @@ module Gitlab ...@@ -3,8 +3,8 @@ module Gitlab
module Status module Status
module Pipeline module Pipeline
module Common module Common
def has_details? def has_details?(current_user)
true can?(current_user, :read_pipeline, subject)
end end
def details_path def details_path
......
...@@ -3,8 +3,8 @@ module Gitlab ...@@ -3,8 +3,8 @@ module Gitlab
module Status module Status
module Stage module Stage
module Common module Common
def has_details? def has_details?(current_user)
true can?(current_user, :read_pipeline, subject)
end end
def details_path 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