##// END OF EJS Templates
fix(forced 2fa): fixed forced 2fa functionality. Fixes: RCCE-68
ilin.s -
r5398:6efbb976 default
parent child Browse files
Show More
@@ -182,6 +182,8 b' class BaseAppView(object):'
182 "warning",
182 "warning",
183 ignore_duplicate=False,
183 ignore_duplicate=False,
184 )
184 )
185 # Special case for users created "on the fly" (ldap case for new user)
186 user_obj.check_2fa_required = False
185 raise HTTPFound(self.request.route_path(self.SETUP_2FA_VIEW))
187 raise HTTPFound(self.request.route_path(self.SETUP_2FA_VIEW))
186
188
187 def _maybe_needs_2fa_check(self, view_name, user_obj):
189 def _maybe_needs_2fa_check(self, view_name, user_obj):
@@ -813,7 +813,7 b' class User(Base, BaseModel):'
813 Checks if 2fa was forced for current user
813 Checks if 2fa was forced for current user
814 """
814 """
815 from rhodecode.model.settings import SettingsModel
815 from rhodecode.model.settings import SettingsModel
816 if value := SettingsModel().get_setting_by_name(f'{self.extern_type}_global_2fa'):
816 if value := SettingsModel().get_setting_by_name(f'auth_{self.extern_type}_global_2fa'):
817 return value.app_settings_value
817 return value.app_settings_value
818 return False
818 return False
819
819
General Comments 0
You need to be logged in to leave comments. Login now