Updated the email template that goes out for password setting on account creation, to give directions also for the case when the user already has a pre-existing account. Updated a test to match.

- Legacy-Id: 17939
This commit is contained in:
Henrik Levkowetz 2020-06-08 19:48:05 +00:00
parent 228f00287b
commit 275e48681d
2 changed files with 11 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import datetime
import io
import logging # pyflakes:ignore
import os
import re
import requests
import requests_mock
import shutil
@ -117,10 +118,10 @@ class IetfAuthTests(TestCase):
def extract_confirm_url(self, confirm_email):
# dig out confirm_email link
msg = get_payload_text(confirm_email)
line_start = "http"
line_re = r"http.*/.*confirm"
confirm_url = None
for line in msg.split("\n"):
if line.strip().startswith(line_start):
if re.search(line_re, line.strip()):
confirm_url = line.strip()
self.assertTrue(confirm_url)

View file

@ -1,12 +1,19 @@
{% autoescape off %}{% load ietf_filters %}
Hello,
{% filter wordwrap:78 %}We have received an account creation request for {{ username }} at {{ domain }}. In order to set a new password for the {{ username }} account, please go to the following link and follow the instructions there:{% endfilter %}
{% filter wordwrap:78 %}We have received an account creation request for {{ username }} at {{ domain }}.{% endfilter %}
{% filter wordwrap:78 %}If you do not already have datatracker account, please go to the following link and follow the instructions there in order to set a new password for the {{ username }} account:{% endfilter %}
https://{{ domain }}{% url "ietf.ietfauth.views.confirm_account" auth %}
This link will expire in {{ expire }} days.
{% filter wordwrap:78 %}If you already have a datatracker account, please go to the following link instead, and add the new email {{ username }} to your existing account:{% endfilter %}
https://{{ domain }}{% url "ietf.ietfauth.views.profile" %}
Best regards,
The datatracker login manager service