diff options
author | Agustin Henze <tin@redhat.com> | 2019-04-09 14:53:44 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-04-09 14:53:44 +0000 |
commit | 20093f9de0b34da88a8b01ca94ee773685b16308 (patch) | |
tree | 6418fff41e2f5deeb5f3839d90472b28c18cf942 /app/models/ci/pipeline.rb | |
parent | 67c330841271537eddad6fc938aa638d68f48a11 (diff) | |
download | gitlab-ce-20093f9de0b34da88a8b01ca94ee773685b16308.tar.gz |
Add new permission model `read-pipeline-variable`
Used to get the variables via the API endpoint
`/projects/:id/pipelines/:pipeline_id/variables`
Signed-off-by: Agustin Henze <tin@redhat.com>
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 01d96754518..b81a3cf8362 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -750,6 +750,10 @@ module Ci self.sha == sha || self.source_sha == sha end + def triggered_by?(current_user) + user == current_user + end + private def ci_yaml_from_repo |