@@ -1962,17 +1967,27 @@ class BaseRegisterView(ItemCreateView): # pylint: disable=locally-disabled,abst
@classmethod
definform_managers(cls,account,form_data):
"""
Send information about new account registration to the user.
Send information about new account registration to the group managers.
Use manager`s locale for email content translations.
"""
forgroupinaccount.memberships_wanted:
flask.current_app.logger.info(
"Attempting to send information about registration of new account '{}' to managers of group '{}'.".format(
account.login,group.name
)
)
ifnotgroup.managed:
flask.current_app.logger.info(
"Unable to send information about registration of new account '{}' to managers of group '{}': group is not marked as self managed.".format(
account.login,group.name
)
)
return
ifnotgroup.managers:
flask.current_app.logger.error(
"Group '{}' is marked as self-managed, but there are no managers.".format(
group.name
"Unable to send information about registration of new account '{}' to managers of group '{}': group is marked as selfmanaged, but there are no managers configured.".format(
account.login,group.name
)
)
return
...
...
@@ -1998,6 +2013,11 @@ class BaseRegisterView(ItemCreateView): # pylint: disable=locally-disabled,abst
justification=form_data['justification']
)
flask.current_app.mailer.send(msg)
flask.current_app.logger.info(
"Sent information about registration of new account '{}' to manager '{}' of group '{}'.".format(