fix(forced 2fa): fixed forced 2fa functionality. Fixes: RCCE-68
This commit is contained in:
parent
d069311e52
commit
f0066be1ff
2 changed files with 3 additions and 1 deletions
|
|
@ -182,6 +182,8 @@ class BaseAppView(object):
|
|||
"warning",
|
||||
ignore_duplicate=False,
|
||||
)
|
||||
# Special case for users created "on the fly" (ldap case for new user)
|
||||
user_obj.check_2fa_required = False
|
||||
raise HTTPFound(self.request.route_path(self.SETUP_2FA_VIEW))
|
||||
|
||||
def _maybe_needs_2fa_check(self, view_name, user_obj):
|
||||
|
|
|
|||
|
|
@ -813,7 +813,7 @@ class User(Base, BaseModel):
|
|||
Checks if 2fa was forced for current user
|
||||
"""
|
||||
from rhodecode.model.settings import SettingsModel
|
||||
if value := SettingsModel().get_setting_by_name(f'{self.extern_type}_global_2fa'):
|
||||
if value := SettingsModel().get_setting_by_name(f'auth_{self.extern_type}_global_2fa'):
|
||||
return value.app_settings_value
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue