summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-11-24 00:21:48 -0800
committerStan Hu <stanhu@gmail.com>2016-11-24 00:21:48 -0800
commita43f71ec144c1a8ab9f9829414699cec062a8b92 (patch)
tree04cbb9f1d290f001214928bdd343acb0d12c9614 /app/views
parentf70a6f3dcaf24d1f70359d4d011294573bc549c1 (diff)
downloadgitlab-ce-a43f71ec144c1a8ab9f9829414699cec062a8b92.tar.gz
Hide project variables values by default
Add a button to reveal/hide the values to help prevent accidental disclosure of sensitive information from wandering on a page. Closes #21358
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/variables/_table.html.haml4
-rw-r--r--app/views/projects/variables/index.html.haml1
2 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/variables/_table.html.haml b/app/views/projects/variables/_table.html.haml
index 07cee86ba4c..c7cebf45160 100644
--- a/app/views/projects/variables/_table.html.haml
+++ b/app/views/projects/variables/_table.html.haml
@@ -12,8 +12,8 @@
- @project.variables.order_key_asc.each do |variable|
- if variable.id?
%tr
- %td= variable.key
- %td= variable.value
+ %td.variable-key= variable.key
+ %td.variable-value{ "data-value" => variable.value }******
%td
= link_to namespace_project_variable_path(@project.namespace, @project, variable), class: "btn btn-transparent btn-variable-edit" do
%span.sr-only
diff --git a/app/views/projects/variables/index.html.haml b/app/views/projects/variables/index.html.haml
index 09bb54600af..39303700131 100644
--- a/app/views/projects/variables/index.html.haml
+++ b/app/views/projects/variables/index.html.haml
@@ -15,3 +15,4 @@
No variables found, add one with the form above.
- else
= render "table"
+ %button.btn.btn-info.js-btn-toggle-reveal-values{"data-status" => 'hidden'} Reveal Values