mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the login account should be locked after N number of attempts. N is configurable using the 'MAX_LOGIN_ATTEMPTS' parameter. Fixes #6337
This commit is contained in:
committed by
Akshay Joshi
parent
c2db647379
commit
a3d3c74e67
@@ -30,7 +30,7 @@ import uuid
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
SCHEMA_VERSION = 30
|
||||
SCHEMA_VERSION = 31
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
@@ -80,6 +80,8 @@ class User(db.Model, UserMixin):
|
||||
# fs_uniquifier is required by flask-security-too >= 4.
|
||||
fs_uniquifier = db.Column(db.String(255), unique=True, nullable=False,
|
||||
default=(lambda _: uuid.uuid4().hex))
|
||||
login_attempts = db.Column(db.Integer, default=0)
|
||||
locked = db.Column(db.Boolean(), default=False)
|
||||
|
||||
|
||||
class Setting(db.Model):
|
||||
|
||||
Reference in New Issue
Block a user