From 1fa573b43445a3174a506568239293a12e1259d7 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 29 May 2023 08:56:14 +0200 Subject: [PATCH] Fixes #36273 - Use proper permission for editing a variable Signed-off-by: Pavel Moravec --- app/controllers/api/v2/ansible_override_values_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v2/ansible_override_values_controller.rb b/app/controllers/api/v2/ansible_override_values_controller.rb index 91d2c62cc..d6a338479 100644 --- a/app/controllers/api/v2/ansible_override_values_controller.rb +++ b/app/controllers/api/v2/ansible_override_values_controller.rb @@ -24,7 +24,7 @@ class AnsibleOverrideValuesController < ::Api::V2::BaseController param_group :ansible_override_value, :as => :create def create - @ansible_variable = AnsibleVariable.authorized(:edit_external_variables). + @ansible_variable = AnsibleVariable.authorized(:edit_ansible_variables). find_by(:id => params[:ansible_variable_id].to_i) @override_value = @ansible_variable.lookup_values.create!(lookup_value_params['override_value']) @ansible_variable.update_attribute(:override, true)