Add is_app_member() to user model

This commit is contained in:
Montana
2019-04-23 13:58:38 -04:00
parent 30018a061b
commit c9deaeec72
2 changed files with 16 additions and 0 deletions

View File

@@ -80,6 +80,9 @@ class User(
def displayname(self):
return self.full_name
def is_app_member(self, application):
return self in application.users
def __repr__(self):
return "<User(name='{}', dod_id='{}', email='{}', has_portfolios='{}', id='{}')>".format(
self.full_name, self.dod_id, self.email, self.has_portfolios, self.id