From 4cfda6a24e739260be75906cedf28fcfc175c6cf Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 7 Jul 2022 14:13:35 +0100 Subject: [PATCH] edit-name controller action --- app/controllers/schemes_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 2441eaf43..400318c2c 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -101,6 +101,8 @@ private new_location_path when "details" scheme_primary_client_group_path(@scheme) + when "edit-name" + schemes_path(@scheme) end end @@ -136,7 +138,7 @@ private def authenticate_scope! head :unauthorized and return unless current_user.data_coordinator? || current_user.support? - if %w[show locations primary_client_group confirm_secondary_client_group secondary_client_group support details check_answers].include?(action_name) && !((current_user.organisation == @scheme.owning_organisation) || current_user.support?) + if %w[show locations primary_client_group confirm_secondary_client_group secondary_client_group support details check_answers edit_name].include?(action_name) && !((current_user.organisation == @scheme.owning_organisation) || current_user.support?) render_not_found and return end end