##// END OF EJS Templates
feat(2fa): improve flash messages on 2fa settings page
super-admin -
r5372:2a8458db default
parent child Browse files
Show More
@@ -230,7 +230,10 b' class MyAccountView(BaseAppView, DataGri'
230 user_instance.has_enabled_2fa = state
230 user_instance.has_enabled_2fa = state
231 user_instance.update_userdata(update_2fa=time.time())
231 user_instance.update_userdata(update_2fa=time.time())
232 Session().commit()
232 Session().commit()
233 h.flash(_("Successfully saved 2FA settings"), category='success')
233 if state:
234 h.flash(_("2FA has been successfully enabled"), category='success')
235 else:
236 h.flash(_("2FA has been successfully disabled"), category='success')
234 raise HTTPFound(self.request.route_path('my_account_configure_2fa'))
237 raise HTTPFound(self.request.route_path('my_account_configure_2fa'))
235
238
236 @LoginRequired()
239 @LoginRequired()
General Comments 0
You need to be logged in to leave comments. Login now