Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-22 14:08:16 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-03-22 14:08:16 +0300
commit05103f080cf0e40b8fe5e1774b8dd1f8084105e3 (patch)
tree9b8982871ed7f714c94e054c2dc0c39afd688091 /app
parentca3b2991a5b740c7b780e997fc1c2ef0ddf62840 (diff)
Make Variable key not secret
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/ci_variable_list/ci_variable_list.js4
-rw-r--r--app/controllers/groups/variables_controller.rb2
-rw-r--r--app/controllers/projects/pipeline_schedules_controller.rb2
-rw-r--r--app/controllers/projects/variables_controller.rb2
-rw-r--r--app/models/ci/group_variable.rb1
-rw-r--r--app/models/ci/pipeline_schedule_variable.rb1
-rw-r--r--app/models/ci/variable.rb1
-rw-r--r--app/views/ci/variables/_variable_row.html.haml2
8 files changed, 6 insertions, 9 deletions
diff --git a/app/assets/javascripts/ci_variable_list/ci_variable_list.js b/app/assets/javascripts/ci_variable_list/ci_variable_list.js
index c0bfe615478..e177a3bfdc7 100644
--- a/app/assets/javascripts/ci_variable_list/ci_variable_list.js
+++ b/app/assets/javascripts/ci_variable_list/ci_variable_list.js
@@ -29,7 +29,7 @@ export default class VariableList {
selector: '.js-ci-variable-input-id',
default: '',
},
- secret_key: {
+ key: {
selector: '.js-ci-variable-input-key',
default: '',
},
@@ -174,7 +174,7 @@ export default class VariableList {
}
toggleEnableRow(isEnabled = true) {
- this.$container.find(this.inputMap.secret_key.selector).attr('disabled', !isEnabled);
+ this.$container.find(this.inputMap.key.selector).attr('disabled', !isEnabled);
this.$container.find('.js-row-remove-button').attr('disabled', !isEnabled);
}
diff --git a/app/controllers/groups/variables_controller.rb b/app/controllers/groups/variables_controller.rb
index 91e394c8ce8..6142e75b4c1 100644
--- a/app/controllers/groups/variables_controller.rb
+++ b/app/controllers/groups/variables_controller.rb
@@ -39,7 +39,7 @@ module Groups
end
def variable_params_attributes
- %i[id secret_key secret_value protected _destroy]
+ %i[id key secret_value protected _destroy]
end
def authorize_admin_build!
diff --git a/app/controllers/projects/pipeline_schedules_controller.rb b/app/controllers/projects/pipeline_schedules_controller.rb
index 6c087dfb71e..fa258f3d9af 100644
--- a/app/controllers/projects/pipeline_schedules_controller.rb
+++ b/app/controllers/projects/pipeline_schedules_controller.rb
@@ -92,7 +92,7 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
def schedule_params
params.require(:schedule)
.permit(:description, :cron, :cron_timezone, :ref, :active,
- variables_attributes: [:id, :secret_key, :secret_value, :_destroy] )
+ variables_attributes: [:id, :key, :secret_value, :_destroy] )
end
def authorize_play_pipeline_schedule!
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index ffe93522ca6..517d0b026c2 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -36,6 +36,6 @@ class Projects::VariablesController < Projects::ApplicationController
end
def variable_params_attributes
- %i[id secret_key secret_value protected _destroy]
+ %i[id key secret_value protected _destroy]
end
end
diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb
index 65399557289..62d768cc6cf 100644
--- a/app/models/ci/group_variable.rb
+++ b/app/models/ci/group_variable.rb
@@ -6,7 +6,6 @@ module Ci
belongs_to :group
- alias_attribute :secret_key, :key
alias_attribute :secret_value, :value
validates :key, uniqueness: {
diff --git a/app/models/ci/pipeline_schedule_variable.rb b/app/models/ci/pipeline_schedule_variable.rb
index 2e30612a88e..03df4e3e638 100644
--- a/app/models/ci/pipeline_schedule_variable.rb
+++ b/app/models/ci/pipeline_schedule_variable.rb
@@ -5,7 +5,6 @@ module Ci
belongs_to :pipeline_schedule
- alias_attribute :secret_key, :key
alias_attribute :secret_value, :value
validates :key, uniqueness: { scope: :pipeline_schedule_id }
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index bcad55f115f..452cb910bca 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -6,7 +6,6 @@ module Ci
belongs_to :project
- alias_attribute :secret_key, :key
alias_attribute :secret_value, :value
validates :key, uniqueness: {
diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml
index e72e48385da..5d4229c80af 100644
--- a/app/views/ci/variables/_variable_row.html.haml
+++ b/app/views/ci/variables/_variable_row.html.haml
@@ -9,7 +9,7 @@
- id_input_name = "#{form_field}[variables_attributes][][id]"
- destroy_input_name = "#{form_field}[variables_attributes][][_destroy]"
-- key_input_name = "#{form_field}[variables_attributes][][secret_key]"
+- key_input_name = "#{form_field}[variables_attributes][][key]"
- value_input_name = "#{form_field}[variables_attributes][][secret_value]"
- protected_input_name = "#{form_field}[variables_attributes][][protected]"