mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
108536490: Implement User.is_active()
If the state of the user is inactive the user.is_active() returns false.
This commit is contained in:
@@ -47,7 +47,10 @@ class User(db.Model):
|
||||
return True
|
||||
|
||||
def is_active(self):
|
||||
return True
|
||||
if self.state == 'inactive':
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def is_anonymous(self):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user