Gestion des utilisateurs

This commit is contained in:
William Bouzourène 2025-01-02 21:18:56 +01:00
parent 7d71923d4f
commit efd8912648
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
14 changed files with 576 additions and 26 deletions

View file

@ -29,10 +29,10 @@ func MfaEnrollMiddleware(c *fiber.Ctx) error {
result := db.First(&user, "id = ?", userid)
if result.Error != nil {
return err
return result.Error
}
if user.TotpSercet.Valid {
if user.TotpSecret.Valid {
return c.Next()
}

View file

@ -28,7 +28,7 @@ func WelcomeMiddleware(c *fiber.Ctx) error {
result := db.First(&user, "id = ?", userid)
if result.Error != nil {
return err
return result.Error
}
if user.SkipWelcome {