summaryrefslogtreecommitdiff
path: root/app/policies/ci/pipeline_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/ci/pipeline_policy.rb')
-rw-r--r--app/policies/ci/pipeline_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/ci/pipeline_policy.rb b/app/policies/ci/pipeline_policy.rb
index f9623587957..e42d78f47c5 100644
--- a/app/policies/ci/pipeline_policy.rb
+++ b/app/policies/ci/pipeline_policy.rb
@@ -16,6 +16,10 @@ module Ci
enable :update_pipeline
end
+ rule { can?(:owner_access) }.policy do
+ enable :destroy_pipeline
+ end
+
def ref_protected?(user, project, tag, ref)
access = ::Gitlab::UserAccess.new(user, project: project)