diff options
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/ci/pipeline_policy.rb | 4 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 1 |
2 files changed, 4 insertions, 1 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) diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 221826121da..1c082945299 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -144,7 +144,6 @@ class ProjectPolicy < BasePolicy enable :destroy_merge_request enable :destroy_issue enable :remove_pages - enable :destroy_pipeline enable :set_issue_iid enable :set_issue_created_at |