diff options
author | Joe Chen <jc@unknwon.io> | 2022-10-23 21:22:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 21:22:36 +0800 |
commit | 3265abfbc22ef36871d8e69f0f9a3a4a5b40b768 (patch) | |
tree | 0079202cdf2e84f7366ba1b1b8064233721f093c /internal/route/user/auth.go | |
parent | d0a4a3401c1c62def511df42769b13cdfba10a6a (diff) |
refactor(db): migrate perms methods off `user.go` (#7207)
Diffstat (limited to 'internal/route/user/auth.go')
-rw-r--r-- | internal/route/user/auth.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/user/auth.go b/internal/route/user/auth.go index d06a7488..a893f8b5 100644 --- a/internal/route/user/auth.go +++ b/internal/route/user/auth.go @@ -184,7 +184,7 @@ func LoginPost(c *context.Context, f form.SignIn) { return } - if !u.IsEnabledTwoFactor() { + if !db.TwoFactors.IsEnabled(c.Req.Context(), u.ID) { afterLogin(c, u, f.Remember) return } |