app: use Instructeur.bypass_email_login_token
This commit is contained in:
parent
fdaaf7c587
commit
ac07f05771
2 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ class ApplicationController < ActionController::Base
|
|||
def redirect_if_untrusted
|
||||
if instructeur_signed_in? &&
|
||||
sensitive_path &&
|
||||
!feature_enabled?(:instructeur_bypass_email_login_token) &&
|
||||
!current_instructeur.bypass_email_login_token &&
|
||||
!IPService.ip_trusted?(request.headers['X-Forwarded-For']) &&
|
||||
!trusted_device?
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ describe ApplicationController, type: :controller do
|
|||
let(:sensitive_path) { true }
|
||||
|
||||
before do
|
||||
Flipper.disable(:instructeur_bypass_email_login_token)
|
||||
current_instructeur.update!(bypass_email_login_token: false)
|
||||
end
|
||||
|
||||
context 'when the instructeur is signed_in' do
|
||||
|
|
Loading…
Reference in a new issue