app: remove :instructeur_bypass_email_login_token
from Flipper
This commit is contained in:
parent
8b3d31980a
commit
d524beee4e
3 changed files with 2 additions and 21 deletions
|
@ -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!
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue