mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 21:07:06 +02:00
Don't show Link to TOTP if not set up (#27585)
This commit is contained in:
1 parent
1d155a43ad
commit
328da56a28
2 files changed
+13
-3
No files matched your search
@@ -37,6 +37,14 @@ func WebAuthn(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
hasTwoFactor, err := auth.HasTwoFactorByUID(ctx, ctx.Session.Get("twofaUid").(int64))
|
||||
if err != nil {
|
||||
ctx.ServerError("HasTwoFactorByUID", err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Data["HasTwoFactor"] = hasTwoFactor
|
||||
|
||||
ctx.HTML(http.StatusOK, tplWebAuthn)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user