From a648bcad7bb7fcf24c0be81abf273da8d0bbf410 Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Tue, 4 Dec 2018 14:40:47 +0100 Subject: extract protected variable logic to helper --- app/views/ci/variables/_variable_row.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/ci') diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml index 151a329228e..16a7527c8ce 100644 --- a/app/views/ci/variables/_variable_row.html.haml +++ b/app/views/ci/variables/_variable_row.html.haml @@ -5,8 +5,8 @@ - id = variable&.id - key = variable&.key - value = variable&.value -- is_protected_default = Gitlab::CurrentSettings.current_application_settings.protected_ci_variables -- is_protected = variable && !only_key_value ? variable.protected : is_protected_default +- is_protected_default = ci_variable_protected_by_default? +- is_protected = ci_variable_protected?(variable, only_key_value) - id_input_name = "#{form_field}[variables_attributes][][id]" - destroy_input_name = "#{form_field}[variables_attributes][][_destroy]" -- cgit v1.2.3