diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 15:08:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 15:08:28 +0300 |
commit | 927df95cc4453bdacbc59960df32008b02c4e28a (patch) | |
tree | 24c2af26a0b7a06661bdf077c3d0300684602e39 /app/policies | |
parent | e5731d5194e20deb33725943248c5899e4fdf05d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/ci/freeze_period_policy.rb | 7 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/policies/ci/freeze_period_policy.rb b/app/policies/ci/freeze_period_policy.rb new file mode 100644 index 00000000000..60e53a7b2f9 --- /dev/null +++ b/app/policies/ci/freeze_period_policy.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module Ci + class FreezePeriodPolicy < BasePolicy + delegate { @subject.resource_parent } + end +end diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 1529ff07005..7f809ca88c1 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -362,6 +362,10 @@ class ProjectPolicy < BasePolicy enable :destroy_deploy_token enable :read_prometheus_alerts enable :admin_terraform_state + enable :create_freeze_period + enable :read_freeze_period + enable :update_freeze_period + enable :destroy_freeze_period end rule { public_project & metrics_dashboard_allowed }.policy do |