diff --git a/hiboo/account/settings.py b/hiboo/account/settings.py index fdbff7943a407368aaf21c32600b410dd468f458..843dd6e4f5c229808d59d9436352925fa32dff87 100644 --- a/hiboo/account/settings.py +++ b/hiboo/account/settings.py @@ -52,31 +52,31 @@ def totp(): @blueprint.route("/totp/setup", methods=["GET", "POST"]) @security.authentication_required() -@security.confirmation_required("Setup 2FA with TOTP") +@security.confirmation_required("setup 2FA with TOTP") def totp_setup(): user = flask_login.current_user auth = models.Auth(models.Auth.TOTP) auth.set_otp_key() user.auths[models.Auth.TOTP] = auth - models.log(models.History.MFA, comment=str(_("2FA has been enabled")), + models.log(models.History.MFA, comment=str(_("2FA with TOTP has been enabled")), user=flask_login.current_user) models.db.session.add(auth) models.db.session.commit() - flask.flash(_("Successfully setup 2FA"), "success") + flask.flash(_("Successfully setup 2FA with TOTP"), "success") return flask.redirect(flask.url_for(".totp")) @blueprint.route("/totp/delete", methods=["GET", "POST"]) @security.authentication_required() -@security.confirmation_required("Delete 2FA with TOTP") +@security.confirmation_required("delete 2FA with TOTP") def totp_delete(): user = flask_login.current_user auth = user.auths[models.Auth.TOTP] - models.log(models.History.MFA, comment=str(_("2FA has been disabled")), + models.log(models.History.MFA, comment=str(_("2FA with TOTP has been disabled")), user=flask_login.current_user) models.db.session.delete(auth) models.db.session.commit() - flask.flash(_("Successfully disabled 2FA"), "success") + flask.flash(_("Successfully disabled 2FA with TOTP"), "success") return flask.redirect(flask.url_for(".totp")) diff --git a/hiboo/templates/macros.html b/hiboo/templates/macros.html index b9b8af09b343dc28293b904e3ed5abdd9673b3cb..117e6b222d9b059e57246295db546371165fa46d 100644 --- a/hiboo/templates/macros.html +++ b/hiboo/templates/macros.html @@ -17,7 +17,6 @@ "create": "plus", "transition": "recycle", "password": "lock", - "enable 2fa": "qrcode", "mfa": "qrcode" }[event.category] }} bg-blue"></i> <div class="timeline-item">