diff --git a/app/controllers/users/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb index fbc164888..55bf11847 100644 --- a/app/controllers/users/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -9,11 +9,11 @@ module Users layout 'procedure_context', only: [:identite, :update_identite, :siret, :update_siret] ACTIONS_ALLOWED_TO_ANY_USER = [:index, :new, :transferer_all, :deleted_dossiers] - ACTIONS_ALLOWED_TO_OWNER_OR_INVITE = [:show, :destroy, :demande, :messagerie, :brouillon, :submit_brouillon, :submit_en_construction, :modifier, :modifier_legacy, :update, :create_commentaire, :papertrail, :restore, :champ] + ACTIONS_ALLOWED_TO_OWNER_OR_INVITE = [:show, :destroy, :demande, :messagerie, :brouillon, :submit_brouillon, :submit_en_construction, :modifier, :update, :create_commentaire, :papertrail, :restore, :champ] before_action :ensure_ownership!, except: ACTIONS_ALLOWED_TO_ANY_USER + ACTIONS_ALLOWED_TO_OWNER_OR_INVITE before_action :ensure_ownership_or_invitation!, only: ACTIONS_ALLOWED_TO_OWNER_OR_INVITE - before_action :ensure_dossier_can_be_updated, only: [:update_identite, :update_siret, :brouillon, :submit_brouillon, :submit_en_construction, :modifier, :modifier_legacy, :update, :champ] + before_action :ensure_dossier_can_be_updated, only: [:update_identite, :update_siret, :brouillon, :submit_brouillon, :submit_en_construction, :modifier, :update, :champ] before_action :ensure_dossier_can_be_filled, only: [:brouillon, :modifier, :submit_brouillon, :submit_en_construction, :update] before_action :ensure_dossier_can_be_viewed, only: [:show] before_action :forbid_invite_submission!, only: [:submit_brouillon] @@ -263,17 +263,6 @@ module Users @dossier = dossier_with_champs end - # Transition to en_construction forks, - # so users editing en_construction dossiers won't completely break their changes. - # TODO: remove me after fork en_construction feature deploy (PR #8790) - def modifier_legacy - respond_to do |format| - format.turbo_stream do - flash.alert = "Une mise à jour de cette page est nécessaire pour poursuivre, veuillez la recharger (touche F5). Attention: le dernier champ modifié n’a pas été sauvegardé, vous devrez le ressaisir." - end - end - end - def submit_en_construction @dossier = dossier_with_champs(pj_template: false) editing_fork_origin = @dossier.editing_fork_origin diff --git a/config/routes.rb b/config/routes.rb index c3dd53caa..88bbb0a8a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -380,7 +380,6 @@ Rails.application.routes.draw do post 'brouillon', to: 'dossiers#submit_brouillon' get 'modifier', to: 'dossiers#modifier' post 'modifier', to: 'dossiers#submit_en_construction' - patch 'modifier', to: 'dossiers#modifier_legacy' get 'champs/:stable_id', to: 'dossiers#champ', as: :champ get 'merci' get 'demande'