diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2017-05-07 22:35:56 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-05-07 22:35:56 +0000 |
commit | 8df3997a92bffa2d29f3c559933a336b837cdb93 (patch) | |
tree | 5ee50876b35b6c5fd40607665f72468cfcee51fe /app/policies | |
parent | 8a0cde81feb3c8f3af26eefa5cef7b72eda2d266 (diff) | |
download | gitlab-ce-8df3997a92bffa2d29f3c559933a336b837cdb93.tar.gz |
Add Pipeline Schedules that supersedes experimental Trigger Schedule
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/ci/pipeline_schedule_policy.rb | 4 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/policies/ci/pipeline_schedule_policy.rb b/app/policies/ci/pipeline_schedule_policy.rb new file mode 100644 index 00000000000..1877e89bb23 --- /dev/null +++ b/app/policies/ci/pipeline_schedule_policy.rb @@ -0,0 +1,4 @@ +module Ci + class PipelineSchedulePolicy < PipelinePolicy + end +end diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 5baac9ebe4b..8f25ac30a22 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -46,6 +46,7 @@ class ProjectPolicy < BasePolicy if project.public_builds? can! :read_pipeline + can! :read_pipeline_schedule can! :read_build end end @@ -63,6 +64,7 @@ class ProjectPolicy < BasePolicy can! :read_build can! :read_container_image can! :read_pipeline + can! :read_pipeline_schedule can! :read_environment can! :read_deployment can! :read_merge_request @@ -83,6 +85,8 @@ class ProjectPolicy < BasePolicy can! :update_build can! :create_pipeline can! :update_pipeline + can! :create_pipeline_schedule + can! :update_pipeline_schedule can! :create_merge_request can! :create_wiki can! :push_code @@ -108,6 +112,7 @@ class ProjectPolicy < BasePolicy can! :admin_build can! :admin_container_image can! :admin_pipeline + can! :admin_pipeline_schedule can! :admin_environment can! :admin_deployment can! :admin_pages @@ -120,6 +125,7 @@ class ProjectPolicy < BasePolicy can! :fork_project can! :read_commit_status can! :read_pipeline + can! :read_pipeline_schedule can! :read_container_image can! :build_download_code can! :build_read_container_image @@ -198,6 +204,7 @@ class ProjectPolicy < BasePolicy unless project.feature_available?(:builds, user) && repository_enabled cannot!(*named_abilities(:build)) cannot!(*named_abilities(:pipeline)) + cannot!(*named_abilities(:pipeline_schedule)) cannot!(*named_abilities(:environment)) cannot!(*named_abilities(:deployment)) end @@ -277,6 +284,7 @@ class ProjectPolicy < BasePolicy can! :read_merge_request can! :read_note can! :read_pipeline + can! :read_pipeline_schedule can! :read_commit_status can! :read_container_image can! :download_code |