diff options
author | Sean McGivern <sean@gitlab.com> | 2019-02-26 17:32:23 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-02-26 17:32:23 +0000 |
commit | f5201a816f2eff9393e16f362403451e5d86ee6c (patch) | |
tree | 21640c40aea443139e1a9e31b2ea606115cf9916 /app | |
parent | 48e6db0dad6f256e8423e0bd6c9b254803f50ccf (diff) | |
parent | 7b445f9b15c31f7b2b53561901183ab23db2d636 (diff) | |
download | gitlab-ce-f5201a816f2eff9393e16f362403451e5d86ee6c.tar.gz |
Merge branch 'revert-8baf9e5f' into 'master'
Revert "Merge branch '13784-simple-masking-of-protected-variables-in-logs' into 'master'"
See merge request gitlab-org/gitlab-ce!25566
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/group_variable.rb | 1 | ||||
-rw-r--r-- | app/models/ci/variable.rb | 1 | ||||
-rw-r--r-- | app/models/concerns/has_variable.rb | 6 | ||||
-rw-r--r-- | app/models/concerns/maskable.rb | 22 |
4 files changed, 3 insertions, 27 deletions
diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb index 323ff560564..492d1d0329e 100644 --- a/app/models/ci/group_variable.rb +++ b/app/models/ci/group_variable.rb @@ -5,7 +5,6 @@ module Ci extend Gitlab::Ci::Model include HasVariable include Presentable - include Maskable belongs_to :group, class_name: "::Group" diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb index 64836ea4fa4..524d79014f8 100644 --- a/app/models/ci/variable.rb +++ b/app/models/ci/variable.rb @@ -5,7 +5,6 @@ module Ci extend Gitlab::Ci::Model include HasVariable include Presentable - include Maskable belongs_to :project diff --git a/app/models/concerns/has_variable.rb b/app/models/concerns/has_variable.rb index 2ec42a1029b..dfbe413a878 100644 --- a/app/models/concerns/has_variable.rb +++ b/app/models/concerns/has_variable.rb @@ -21,9 +21,9 @@ module HasVariable def key=(new_key) super(new_key.to_s.strip) end - end - def to_runner_variable - { key: key, value: value, public: false } + def to_runner_variable + { key: key, value: value, public: false } + end end end diff --git a/app/models/concerns/maskable.rb b/app/models/concerns/maskable.rb deleted file mode 100644 index 8793f0ec965..00000000000 --- a/app/models/concerns/maskable.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Maskable - extend ActiveSupport::Concern - - # * Single line - # * No escape characters - # * No variables - # * No spaces - # * Minimal length of 8 characters - # * Absolutely no fun is allowed - REGEX = /\A\w{8,}\z/ - - included do - validates :masked, inclusion: { in: [true, false] } - validates :value, format: { with: REGEX }, if: :masked? - end - - def to_runner_variable - super.merge(masked: masked?) - end -end |