Skip to content

Commit 6c41354

Browse files
committed
Manually merge PR242 to update external account (migoid/migcert) expire warning emails to point to the new built-in Renew button at the Account page where applicable in order to limit operator overhead from account renewals.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6234 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 01e3e49 commit 6c41354

File tree

1 file changed

+26
-47
lines changed

1 file changed

+26
-47
lines changed

mig/shared/notification.py

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --- BEGIN_HEADER ---
55
#
66
# notification - instant message and email notification helpers
7-
# Copyright (C) 2003-2023 The MiG Project lead by Brian Vinter
7+
# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH
88
#
99
# This file is part of MiG.
1010
#
@@ -424,68 +424,47 @@ def create_notify_message(
424424
req_fields)
425425
# Mark ID fields as readonly in the form to limit errors
426426
user_req['ro_fields'] = keyword_auto
427-
# Extract and pass saved peer fields even in the signed-in case
428-
peers_fields = ['peers_%s' % i
429-
for i in configuration.site_peers_explicit_fields]
430-
peers_req = dict([i for i in user_req.items() if i[0] in peers_fields])
431-
peers_query = '%s' % urlencode(peers_req)
432427
id_query = '%s' % urlencode(user_req)
433428
user_dict.update(user_req)
434-
id_lines = """Full name: %(full_name)s
435-
Email address: %(email)s
436-
Organization: %(organization)s
437-
Two letter country-code: %(country)s
438-
State: %(state)s""" % user_dict
439429
header = '%s account expire for %s' % (short_title, user_name)
440-
txt += """This is an automatic account access expire warning from %s.
430+
txt += """This is a reminder that your %s account access will expire on %s.
441431
442-
Basically you need to renew your account before %s if you want to
443-
preserve full account access. """ % (short_title, expire)
432+
To ensure uninterrupted access, please extend your access before then.""" % \
433+
(short_title, expire)
444434
if "migoid" in affected or "migcert" in affected:
445435
if "migoid" in affected:
446-
auth_migreq_url = auth_migoid_url
436+
auth_access_url = auth_migoid_url
447437
req_name = "reqoid"
448-
user_credentials = "username %s" % user_email
438+
user_credentials = "%s credentials" % user_email
439+
extend_days = configuration.oid_valid_days
449440
else:
450-
auth_migreq_url = auth_migcert_url
441+
auth_access_url = auth_migcert_url
451442
req_name = "reqcert"
452443
user_credentials = "%s certificate" % from_id
453-
txt += """Until that date you can always simply log on with
454-
your %s
455-
and request semi-automatic renewal, only filling the password and comment
456-
fields at
457-
%s/cgi-bin/%s.py?%s
458-
In that way you can also choose a new password if you like.
459-
460-
After account access expiry you will temporarily lose ALL access and can only
461-
regain it by submitting another account request matching your original one.
462-
I.e. open the semi-filled account request page at
444+
extend_days = configuration.cert_valid_days
445+
txt += """
446+
Until that date you can do so by simply logging on to your %s account at
447+
%s with your %s and request renewal in
448+
the Account section. That will instantly extend your access with up to %d days
449+
if you still have valid peer acceptance.
450+
451+
If you do not react before then you will temporarily lose all account access.
452+
To restore access after that point or to renew with approval from a different
453+
peer please submit the semi-filled account request page at
463454
%s/cgi-sid/%s.py?%s
464-
or manually fill it all on
465-
%s/cgi-sid/%s.py
466-
For already expired accounts the form MUST be filled with the exact values
467-
you're signed up with - including your EXISTING password!
468-
In case you use the last link you need to enter your ID values:
469-
%s
470-
471-
In either case please ALWAYS enter a few lines of comment about why you still
472-
need access and who your main on-site employed contacts are (name AND email).
473-
Names of the specific collaboration projects or courses you need access for
474-
may also be helpful to speed up our verification and renewal process.
455+
using your EXISTING password as proof of account ownership.
475456
476-
We reserve the right to eventually suspend or even permanently delete accounts
477-
that have remained expired and unused for a prolonged period of time. We will
478-
first try to contact you again on email in that case.
457+
You can use the 'Forgot password'-link at the login page first in case you no
458+
longer remember your chosen account password.
479459
480-
Please contact the %s admins in case you should ever lose or forget your
481-
password. The same applies if you suspect or know that someone may have gotten
482-
hold of your login.
460+
To ensure efficient resource management, accounts that expired and remain
461+
unused for a significant time may eventually be suspended or permanently
462+
deleted. We will attempt to notify you again before taking any such action.
483463
484464
Regards,
485465
The %s Admins
486-
""" % (user_credentials, auth_migreq_url, req_name, peers_query,
487-
anon_migreq_url, req_name, id_query, anon_migreq_url, req_name,
488-
id_lines, short_title, short_title)
466+
""" % (short_title, auth_access_url, user_credentials, extend_days,
467+
anon_migreq_url, req_name, id_query, short_title)
489468
else:
490469
if "extoid" in affected:
491470
extend_days = oid_auto_extend_days

0 commit comments

Comments
 (0)