Extra sender addresses for account.

see #802
This commit is contained in:
Antoine Nguyen
2016-09-11 17:42:53 +02:00
parent 1e549dc545
commit 936200710b
14 changed files with 242 additions and 57 deletions
+7
View File
@@ -357,6 +357,13 @@ class User(PermissionsMixin):
self.save()
self._role = role
def get_role_display(self):
"""Return the display name of this role."""
for role in constants.ROLES:
if role[0] == self.role:
return role[1]
return _("Unknown")
@cached_property
def is_admin(self):
"""Shortcut to check if user is administrator."""