feat(2fa): improve flash messages on 2fa settings page
This commit is contained in:
parent
d80f6eb5a8
commit
0628f37e75
1 changed files with 4 additions and 1 deletions
|
|
@ -230,7 +230,10 @@ class MyAccountView(BaseAppView, DataGridAppView):
|
|||
user_instance.has_enabled_2fa = state
|
||||
user_instance.update_userdata(update_2fa=time.time())
|
||||
Session().commit()
|
||||
h.flash(_("Successfully saved 2FA settings"), category='success')
|
||||
if state:
|
||||
h.flash(_("2FA has been successfully enabled"), category='success')
|
||||
else:
|
||||
h.flash(_("2FA has been successfully disabled"), category='success')
|
||||
raise HTTPFound(self.request.route_path('my_account_configure_2fa'))
|
||||
|
||||
@LoginRequired()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue