diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-11-13 17:17:01 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-11-13 17:24:10 +0100 |
commit | 0bc14b452218277a55f71ab22bed724b696ecf28 (patch) | |
tree | e40bfff5efb59240cac45ac07906b3fccaf76291 /app/policies | |
parent | 6173d4639a388f59872291657a2528256c90a846 (diff) | |
download | gitlab-ce-0bc14b452218277a55f71ab22bed724b696ecf28.tar.gz |
Authorize DestroyPipelineService against pipeline
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 |