108536490: Implement User.is_active()

If the state of the user is inactive the user.is_active() returns false.
This commit is contained in:
Rebecca Law
2015-11-30 16:44:59 +00:00
parent 3b27db98ff
commit edfc1d6efc
4 changed files with 38 additions and 1 deletions

View File

@@ -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