diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-10-31 20:12:22 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-11-29 15:04:59 +0100 |
commit | 943827b39ae1e3203736ec87724ec255505ae980 (patch) | |
tree | f889e435ea91cb51bec5ec276f3a3d23d5faa524 /app/views/ci | |
parent | 5bf893952b82b4877790f5a7932b2f799393c686 (diff) | |
download | gitlab-ce-943827b39ae1e3203736ec87724ec255505ae980.tar.gz |
option to make variables protected by default
Diffstat (limited to 'app/views/ci')
-rw-r--r-- | app/views/ci/variables/_variable_row.html.haml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml index 6ee55836dd2..151a329228e 100644 --- a/app/views/ci/variables/_variable_row.html.haml +++ b/app/views/ci/variables/_variable_row.html.haml @@ -5,7 +5,8 @@ - id = variable&.id - key = variable&.key - value = variable&.value -- is_protected = variable && !only_key_value ? variable.protected : false +- is_protected_default = Gitlab::CurrentSettings.current_application_settings.protected_ci_variables +- is_protected = variable && !only_key_value ? variable.protected : is_protected_default - id_input_name = "#{form_field}[variables_attributes][][id]" - destroy_input_name = "#{form_field}[variables_attributes][][_destroy]" @@ -39,7 +40,8 @@ %input{ type: "hidden", class: 'js-ci-variable-input-protected js-project-feature-toggle-input', name: protected_input_name, - value: is_protected } + value: is_protected, + data: { default: is_protected_default.to_s } } %span.toggle-icon = sprite_icon('status_success_borderless', size: 16, css_class: 'toggle-icon-svg toggle-status-checked') = sprite_icon('status_failed_borderless', size: 16, css_class: 'toggle-icon-svg toggle-status-unchecked') |