diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-08 12:52:44 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-12 14:59:01 +0300 |
commit | a83a80edb368d9b5697493123c2f13d8b7c6531e (patch) | |
tree | 34df5b9422b3309d4725514b3b243968facb3f31 /lib/gitlab | |
parent | 1b6c2c3c0a38bed733d861902eb8c9397ab76cd3 (diff) |
Check permission of details
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ci/status/build/common.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/status/core.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/common.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/status/stage/common.rb | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/ci/status/build/common.rb b/lib/gitlab/ci/status/build/common.rb index 3e47d7dfd20..2fb79afa3d3 100644 --- a/lib/gitlab/ci/status/build/common.rb +++ b/lib/gitlab/ci/status/build/common.rb @@ -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 diff --git a/lib/gitlab/ci/status/core.rb b/lib/gitlab/ci/status/core.rb index 60c559248aa..6b47096f811 100644 --- a/lib/gitlab/ci/status/core.rb +++ b/lib/gitlab/ci/status/core.rb @@ -33,7 +33,7 @@ module Gitlab self.class.name.demodulize.downcase.underscore end - def has_details? + def has_details?(_user = nil) false end diff --git a/lib/gitlab/ci/status/pipeline/common.rb b/lib/gitlab/ci/status/pipeline/common.rb index 25e52bec3da..5f79044a496 100644 --- a/lib/gitlab/ci/status/pipeline/common.rb +++ b/lib/gitlab/ci/status/pipeline/common.rb @@ -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 diff --git a/lib/gitlab/ci/status/stage/common.rb b/lib/gitlab/ci/status/stage/common.rb index 14c437d2b98..e6ee2f92341 100644 --- a/lib/gitlab/ci/status/stage/common.rb +++ b/lib/gitlab/ci/status/stage/common.rb @@ -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 |