mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Don't check for second factor when switching to anonymous account (#7803)
This commit is contained in:
parent
7f14e185cc
commit
4ba35472e6
4 changed files with 39 additions and 0 deletions
|
@ -745,6 +745,7 @@ class ApplicationController < ActionController::Base
|
|||
check_totp = current_user &&
|
||||
!request.format.json? &&
|
||||
!is_api? &&
|
||||
!(SiteSetting.allow_anonymous_posting && current_user.anonymous?) &&
|
||||
((SiteSetting.enforce_second_factor == 'staff' && current_user.staff?) ||
|
||||
SiteSetting.enforce_second_factor == 'all') &&
|
||||
!current_user.totp_enabled?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue