diff --git a/app/controllers/manager/instructeurs_controller.rb b/app/controllers/manager/instructeurs_controller.rb index b69b89d35..2bfe85d9c 100644 --- a/app/controllers/manager/instructeurs_controller.rb +++ b/app/controllers/manager/instructeurs_controller.rb @@ -1,23 +1,5 @@ module Manager class InstructeursController < Manager::ApplicationController - # Temporary code: synchronize Flipper's instructeur_bypass_email_login_token - # when Instructeur.bypass_email_login_token is modified. - # - # This will be removed when the migration of this feature flag out of Flipper will be complete. - def update - super - - instructeur = requested_resource - saved_successfully = !requested_resource.changed? - if saved_successfully - if instructeur.bypass_email_login_token - Flipper.enable_actor(:instructeur_bypass_email_login_token, instructeur.user) - else - Flipper.disable_actor(:instructeur_bypass_email_login_token, instructeur.user) - end - end - end - def reinvite instructeur = Instructeur.find(params[:id]) instructeur.user.invite! diff --git a/config/application.rb b/config/application.rb index e680d7ac0..2d9b15e9f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -63,8 +63,8 @@ module TPS end config.middleware.use Rack::Attack - config.middleware.use Flipper::Middleware::Memoizer, - preload: [:instructeur_bypass_email_login_token] + # Ensure we make maximum one call per feature per request. + config.middleware.use Flipper::Middleware::Memoizer config.ds_env = ENV.fetch('DS_ENV', Rails.env) diff --git a/config/initializers/flipper.rb b/config/initializers/flipper.rb index 1dd25d5cd..f335c7ce3 100644 --- a/config/initializers/flipper.rb +++ b/config/initializers/flipper.rb @@ -30,7 +30,6 @@ features = [ :dossier_pdf_vide, :expert_not_allowed_to_invite, :hide_instructeur_email, - :instructeur_bypass_email_login_token, :procedure_revisions, :procedure_routage_api, :procedure_process_expired_dossiers_termine