mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-21 14:59:47 -04:00
108536490: add the proxy_fix
This commit is contained in:
@@ -49,23 +49,17 @@ class User(db.Model):
|
||||
def is_active(self):
|
||||
return True
|
||||
|
||||
def is_locked(self):
|
||||
if self.failed_login_count <= current_app.config['MAX_FAILED_LOGIN_COUNT']:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def is_anonymous(self):
|
||||
return False
|
||||
|
||||
def get_id(self):
|
||||
return self.id
|
||||
|
||||
@staticmethod
|
||||
def load_user(user_id):
|
||||
user = User.query.filter_by(id=user_id).first()
|
||||
if user.is_active():
|
||||
return user
|
||||
def is_locked(self):
|
||||
if self.failed_login_count <= current_app.config['MAX_FAILED_LOGIN_COUNT']:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def filter_null_value_fields(obj):
|
||||
|
||||
Reference in New Issue
Block a user