Better UX when recovering organization emails

Fixes #291
This commit is contained in:
Joseph Schorr 2015-12-28 15:25:31 -05:00
parent 16f16e8a15
commit 31a8a0fba4
7 changed files with 76 additions and 11 deletions

View file

@ -117,6 +117,15 @@ def send_repo_authorization_email(namespace, repository, email, token):
'token': token
}, action=action)
def send_org_recovery_email(org, admin_users):
subject = 'Organization %s recovery' % (org.username)
send_email(org.email, subject, 'orgrecovery', {
'organization': org.username,
'admin_usernames': [user.username for user in admin_users],
})
def send_recovery_email(email, token):
action = GmailAction.view('Recover Account', 'recovery?code=' + token,
'Recovery of an account')