From d1c31e0fd49390b961c4ad951d23d4fe54383c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=90=99PiperYxzzy?= Date: Sat, 30 Apr 2022 16:05:41 +0200 Subject: [PATCH] Temp tweak to enable an easy way to turn email verification off for testing --- models/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/auth.go b/models/auth.go index 67afd62..817c5d9 100644 --- a/models/auth.go +++ b/models/auth.go @@ -21,6 +21,8 @@ func (a *Auth) SetPassword(pass string) error { return nil } +const VerifiedRequired = false + func (a *Auth) Login(pass string, tfCode string) (error, bool) { if err := a.CheckPassword(pass); err != nil { return err, false @@ -30,7 +32,7 @@ func (a *Auth) Login(pass string, tfCode string) (error, bool) { return err, true } - if !a.Verified { + if !a.Verified && VerifiedRequired { return errors.New("not yet verified"), true }