mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
108536490: Implement locked out function.
User is locked if they fail to login 10 times or more.
This commit is contained in:
@@ -56,7 +56,7 @@ class User(db.Model):
|
||||
return self.id
|
||||
|
||||
def is_locked(self):
|
||||
if self.failed_login_count <= current_app.config['MAX_FAILED_LOGIN_COUNT']:
|
||||
if self.failed_login_count < current_app.config['MAX_FAILED_LOGIN_COUNT']:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user