Commit 3072259b authored by Flavio TARSETTI's avatar Flavio TARSETTI

[accounts/ui][views/templates] add expiration date and procedure with...

[accounts/ui][views/templates] add expiration date and procedure with temporary url account email messages
parent dc1f9340
Pipeline #47101 canceled with stage
in 29 seconds
......@@ -259,10 +259,15 @@ def perform_revalidation(request, supervisiontrack, supervisee, now):
)
)
account_settings_url = request.build_absolute_uri(
reverse("accounts:settings")
)
context = {
"supervisor": supervisiontrack.supervisor,
"supervisee": supervisee,
"supervisor_rejection_url": supervisor_rejection_url,
"account_settings": account_settings_url,
"expiry_date": temp_url_rejection.expires,
}
mail.send_email(
......@@ -428,10 +433,14 @@ def inform_supervisor_new_supervisee_request(
reverse("accounts:temp_url_validation", kwargs={"hash_url": temp_url.url_hash},)
)
contact_url = request.build_absolute_uri(reverse("contact"))
account_settings_url = request.build_absolute_uri(reverse("accounts:settings"))
context = {
"supervisor": supervisor,
"supervisee": supervisee,
"supervisor_validation_url": supervisor_validation_url,
"expiry_date": temp_url.expires,
"account_settings": account_settings_url,
"contact_url": contact_url,
}
......
......@@ -140,11 +140,16 @@ class RegistrationManager(models.Manager):
)
)
contact_url = request.build_absolute_uri(reverse("contact"))
account_settings_url = request.build_absolute_uri(
reverse("accounts:settings")
)
context = {
"supervisor": supervisor_user,
"supervisee": user,
"supervisor_validation_url": supervisor_validation_url,
"expiry_date": temp_url.expires,
"account_settings": account_settings_url,
"contact_url": contact_url,
}
......
......@@ -4,8 +4,12 @@ Your supervisee {{ supervisee.username }} ({{supervisee.first_name}} {{supervise
If he's still your current supervisee, you can drop this message.
However if he's not your supervisee anymore, you can immediately revoke your supervision by clicking on the following link:
However if he's not your supervisee anymore, you can immediately revoke your supervision by clicking on the following link, which expires on {{ expiry_date }}:
{{ supervisor_rejection_url }}
If the above link does not work or is expired, please proceed to your profile settings page with the following
link {{ account_settings }} and from there, under the management of supervisees, you will be able
to manually accept or reject any supervisee.
BEAT Administrators at the Idiap Research Institute
......@@ -12,10 +12,15 @@ Username: {{ supervisee.username }}
If you don't do this the supervisee will not be able to use his account and
will be deleted after 7 days.
You can also click on the following direct link to accomplish this action and accept this new supervisee at:
You can also click on the following direct link, which expires on {{ expiry_date }}, to accomplish this action
and accept this new supervisee at:
{{ supervisor_validation_url }}
If the above link does not work or is expired, please proceed to your profile settings page with the following
link {{ account_settings }} and from there, under the management of supervisees, you will be able
to manually accept or reject any supervisee.
If you are having problems to activate your supervisee account, contact a member of our
support staff at {{ contact_url }}.
......
......@@ -12,10 +12,15 @@ Username: {{ supervisee.username }}
If you don't do this the supervisee will not be able to use his account in
future and will not be recognized as your supervisee.
You can also click on the following direct link to accomplish this action and accept this new supervisee at:
You can also click on the following direct link, which expires on {{ expiry_date }}, to accomplish this action
and accept this new supervisee at:
{{ supervisor_validation_url }}
If the above link does not work or is expired, please proceed to your profile settings page with the following
link {{ account_settings }} and from there, under the management of supervisees, you will be able
to manually accept or reject any supervisee.
If you are having problems to activate your supervisee account, contact a member of our
support staff at {{ contact_url }}.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment