diff --git a/data/model/organization.py b/data/model/organization.py index a855385e9..e83c6907e 100644 --- a/data/model/organization.py +++ b/data/model/organization.py @@ -72,6 +72,9 @@ def __get_org_admin_users(org): .where(Team.organization == org, TeamRole.name == 'admin', User.robot == False) .distinct()) +def get_admin_users(org): + """ Returns the owner users for the organization. """ + return __get_org_admin_users(org) def remove_organization_member(org, user_obj): org_admins = [u.username for u in __get_org_admin_users(org)] diff --git a/data/model/user.py b/data/model/user.py index d05ea1693..9ab763071 100644 --- a/data/model/user.py +++ b/data/model/user.py @@ -402,7 +402,7 @@ def create_reset_password_email_code(email): try: user = User.get(User.email == email) except User.DoesNotExist: - raise InvalidEmailAddressException('Email address was not found.'); + raise InvalidEmailAddressException('Email address was not found.') if user.organization: raise InvalidEmailAddressException('Organizations can not have passwords.') diff --git a/emails/orgrecovery.html b/emails/orgrecovery.html new file mode 100644 index 000000000..cda1d17e0 --- /dev/null +++ b/emails/orgrecovery.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block content %} + +
{{ sent.orgemail }}
is assigned to organization {{ sent.orgname }}
.
+ To access that organization, an admin user must be used.
+ {{ sent.orgemail }}
with the full list of admin users.
+