diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-25 14:41:11 +0300 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-07-15 16:05:22 +0300 |
commit | 42d99460d3bbae88fdd9d8415970ecbfffc85a01 (patch) | |
tree | 0539b3150651f2a18567a58cf9b7a7aa87abf46d /app/policies/ci | |
parent | 0e8af2525f16d871510c24e6e15f1bc80f133edd (diff) |
Allow use of legacy triggers with feature flag
Keep feature flag disabled by default and turn off
all functionality related to legacy triggers.
* Block legacy triggers from creating pipeline
* Highlight legacy triggers to be invalid via the UI
* Make legacy triggers invalid in the model
Diffstat (limited to 'app/policies/ci')
-rw-r--r-- | app/policies/ci/trigger_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/ci/trigger_policy.rb b/app/policies/ci/trigger_policy.rb index 209db44539c..578301d7f7e 100644 --- a/app/policies/ci/trigger_policy.rb +++ b/app/policies/ci/trigger_policy.rb @@ -5,7 +5,7 @@ module Ci delegate { @subject.project } with_options scope: :subject, score: 0 - condition(:legacy) { @subject.legacy? } + condition(:legacy) { @subject.supports_legacy_tokens? && @subject.legacy? } with_score 0 condition(:is_owner) { @user && @subject.owner_id == @user.id } |