aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-backend/src
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-08-27 23:55:09 +0100
committerGravatar Chris Lovering <[email protected]>2024-08-27 23:55:09 +0100
commitace202b82f1b04704314ce0972d4b1d4fe2efc96 (patch)
treec541d16e6a31b8f0d39e30d5427142a250e689ec /thallium-backend/src
parentAdd debug endpoint for creating users (diff)
make pw reset codes unique
Diffstat (limited to 'thallium-backend/src')
-rw-r--r--thallium-backend/src/orm/users.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/thallium-backend/src/orm/users.py b/thallium-backend/src/orm/users.py
index 1aa0bfe..d34edbd 100644
--- a/thallium-backend/src/orm/users.py
+++ b/thallium-backend/src/orm/users.py
@@ -16,7 +16,7 @@ class User(UUIDBase, AuditBase, Base):
permissions: Mapped[int]
password_set_at: Mapped[datetime] = mapped_column(TIMESTAMP(timezone=True))
require_password_change: Mapped[bool] = mapped_column(default=True)
- password_reset_code: Mapped[str] = mapped_column(nullable=True)
+ password_reset_code: Mapped[str] = mapped_column(nullable=True, unique=True)
active: Mapped[bool] = mapped_column(default=True)
__table_args__ = (