More refactoring of db.DefaultContext (#27083)

Next step of #27065
This commit is contained in:
JakobDev authored and GitHub committed 2023-09-15 06:13:19 +00:00
1 parent f8a1094406
commit c548dde205
83 files changed
+336 -320

No files matched your search

+1 -1
View File
@@ -776,7 +776,7 @@ func verifyAuthWithOptions(options *common.VerifyOptions) func(ctx *context.APIC
if skip, ok := ctx.Data["SkipLocalTwoFA"]; ok && skip.(bool) {
return // Skip 2FA
}
twofa, err := auth_model.GetTwoFactorByUID(ctx.Doer.ID)
twofa, err := auth_model.GetTwoFactorByUID(ctx, ctx.Doer.ID)
if err != nil {
if auth_model.IsErrTwoFactorNotEnrolled(err) {
return // No 2FA enrollment for this user