Enable blocking and unblocking of users.

This commit is contained in:
Jens Luedicke
2025-06-28 11:10:22 +02:00
parent b2861686ea
commit 99765d5728
5 changed files with 75 additions and 11 deletions

View File

@@ -22,6 +22,9 @@ class User(db.Model):
time_entries = db.relationship('TimeEntry', backref='user', lazy=True)
work_config = db.relationship('WorkConfig', backref='user', lazy=True, uselist=False)
# New field for blocking users
is_blocked = db.Column(db.Boolean, default=False)
def set_password(self, password):
self.password_hash = generate_password_hash(password)