remove unused TOTP field and update user model constraints

This commit is contained in:
Eduardo Silva
2026-03-15 16:29:20 -03:00
parent 6b70701c9c
commit 517bd14bdb
4 changed files with 35 additions and 9 deletions

View File

@@ -15,7 +15,6 @@ class AuthMethod(models.Model):
# TOTP-specific fields
totp_secret = models.CharField(max_length=255, blank=True, help_text=_("Shared/global TOTP secret key"))
totp_before_auth = models.BooleanField(default=False)
# OIDC-specific fields
oidc_provider = models.CharField(max_length=64, blank=True)
@@ -65,9 +64,8 @@ class AuthMethodAllowedEmail(models.Model):
class GatekeeperUser(models.Model):
username = models.SlugField(max_length=64, unique=True)
email = models.EmailField(unique=True)
password = models.CharField(blank=True, max_length=128, help_text=_("Password for local authentication (leave blank if not using)"))
password_hash = models.CharField(blank=True, null=True, max_length=128)
email = models.EmailField(unique=True, blank=True)
password = models.CharField(blank=True, max_length=250, help_text=_("Password for local authentication (leave blank if not using)"))
totp_secret = models.CharField(max_length=255, blank=True, help_text=_("Per-user TOTP secret key"))
created = models.DateTimeField(auto_now_add=True)