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