summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2019-04-03 17:55:56 +0000
committerClement Ho <clemmakesapps@gmail.com>2019-04-03 17:55:56 +0000
commit3de4399406eab3a34d9c07c31a99bc5e32de310e (patch)
treed003954100bb7702fe80a80d586b81f93b0ff352 /app/helpers
parentee72dc1b34d893662fe0cb7793a1a960312b1f48 (diff)
parent02c99ec8ce0449f330f0fd9ca277ea4cdc82be23 (diff)
downloadgitlab-ce-3de4399406eab3a34d9c07c31a99bc5e32de310e.tar.gz
Merge branch '13784-validate-variables-for-masking' into 'master'
Simple masking frontend - CE See merge request gitlab-org/gitlab-ce!26751
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/ci_variables_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/ci_variables_helper.rb b/app/helpers/ci_variables_helper.rb
index e3728804c2a..88ce311a1d4 100644
--- a/app/helpers/ci_variables_helper.rb
+++ b/app/helpers/ci_variables_helper.rb
@@ -12,4 +12,12 @@ module CiVariablesHelper
ci_variable_protected_by_default?
end
end
+
+ def ci_variable_masked?(variable, only_key_value)
+ if variable && !only_key_value
+ variable.masked
+ else
+ true
+ end
+ end
end