mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Missing 2FA guards when sso is enabled or when local login is disabled.
This commit is contained in:
@@ -33,6 +33,8 @@ module SecondFactorManager
|
||||
end
|
||||
|
||||
def totp_enabled?
|
||||
!!(self&.user_second_factor&.enabled?)
|
||||
!!(self&.user_second_factor&.enabled?) &&
|
||||
!SiteSetting.enable_sso &&
|
||||
SiteSetting.enable_local_logins
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user