diff --git a/uffd/default_config.cfg b/uffd/default_config.cfg index e56c564d3c8462f612e2875d1277d7b117f1d0b3..bad3f2aff29955bd74d50b8ad06f29763b379a74 100644 --- a/uffd/default_config.cfg +++ b/uffd/default_config.cfg @@ -56,7 +56,7 @@ SESSION_COOKIE_SAMESITE='Strict' LANGUAGES={ # Language identifier (see Accept-Language HTTP header) -> Display Name "en": "EN", - "de": "DE", # Too incomplete right now to enable per default + "de": "DE", } ACL_ADMIN_GROUP="uffd_admin" @@ -157,6 +157,13 @@ SERVICES_PUBLIC=True BRANDING_LOGO_URL='/static/empty.png' +# Name and contact mail address are displayed to users in a few places (plain text only!) +ORGANISATION_NAME='CCCV' +ORGANISATION_CONTACT='it@cccv.de' + +# Optional text included in account registration mails (plain text only!) +WELCOME_TEXT='See https://sso.cccv.de/services/ for documentation on the services you have access to.' + # do NOT set in production #TEMPLATES_AUTO_RELOAD=True diff --git a/uffd/invite/templates/invite/use.html b/uffd/invite/templates/invite/use.html index 344b8b0379e861bcb6e113585f2837f1489eb258..d31f23d467126fb7aaa3ef1171ba57d5b32181a7 100644 --- a/uffd/invite/templates/invite/use.html +++ b/uffd/invite/templates/invite/use.html @@ -11,7 +11,7 @@ <h2 class="text-center">{{_('Invite Link')}}</h2> </div> {% if not request.user %} - <p>Welcome to the CCCV Single-Sign-On!</p> + <p>{{_('Welcome to the %(org_name)s Single-Sign-On!', org_name=config.ORGANISATION_NAME)}}</p> {% endif %} {% if invite.roles and invite.allow_signup %} diff --git a/uffd/selfservice/templates/selfservice/newuser.mail.txt b/uffd/selfservice/templates/selfservice/newuser.mail.txt index adc5af9faec816fbd72c2a2f33cf4d1c99973b83..cfe43223a2e8bef09d01783db7fb4068a59f24ee 100644 --- a/uffd/selfservice/templates/selfservice/newuser.mail.txt +++ b/uffd/selfservice/templates/selfservice/newuser.mail.txt @@ -1,12 +1,16 @@ Hi {{ user.displayname }}, -welcome to the CCCV infrastructure. An account was created for you, please visit the following url to set your -password: {{ url_for('selfservice.token_password', token=token, _external=True) }} +welcome to the {{ config.ORGANISATION_NAME }} infrastructure! An account was created for you. + +Please visit the following url to set your password: + +{{ url_for('selfservice.token_password', token=token, _external=True) }} **The link is valid for 48h** -If you were granted access to crews or orbits, you have been automatically subscribed to the corresponding mailinglists. -Please find and read the documentation for all services you are granted access to at https://sso.cccv.de/services/. +{% if config.WELCOME_TEXT %} +{{ config.WELCOME_TEXT }} + +{% endif -%} -If you have no idea why someone would create an account for you to be used for the next CCC event organization or have -other questions, please contact the infra team at it@cccv.de. +If you think the account was created by mistake, please contact the administrators at {{ config.ORGANISATION_CONTACT }}. diff --git a/uffd/selfservice/views.py b/uffd/selfservice/views.py index dd6b643781299423a244eb12705c79b8257b9abd..dc237f7fa74a647008d9481dd8c6590af78120d0 100644 --- a/uffd/selfservice/views.py +++ b/uffd/selfservice/views.py @@ -178,7 +178,7 @@ def send_passwordreset(user, new=False): msg = EmailMessage() if new: msg.set_content(render_template('selfservice/newuser.mail.txt', user=user, token=token.token)) - msg['Subject'] = 'Welcome to the CCCV infrastructure' + msg['Subject'] = 'Welcome to the %s infrastructure'%current_app.config.get('ORGANISATION_NAME', '') else: msg.set_content(render_template('selfservice/passwordreset.mail.txt', user=user, token=token.token)) msg['Subject'] = 'Password reset' diff --git a/uffd/signup/templates/signup/mail.txt b/uffd/signup/templates/signup/mail.txt index 38cf3a846f9820fc6c7d2614a302844fa3d7192d..b73479fb199170f7851d008ecab0b40050ad05ba 100644 --- a/uffd/signup/templates/signup/mail.txt +++ b/uffd/signup/templates/signup/mail.txt @@ -1,13 +1,16 @@ Hi {{ signup.displayname }}, -an account was created on the CCCV infrastructure with this mail address. +an account was created on the {{ config.ORGANISATION_NAME }} infrastructure with this mail address. + Please visit the following url to complete the account registration: {{ url_for('signup.signup_confirm', token=signup.token, _external=True) }} **The link is valid for 48h** -You can find more information at https://docs.cccv.de/. +{% if config.WELCOME_TEXT %} +{{ config.WELCOME_TEXT }} + +{% endif -%} -If you have not requested an account on the CCCV infrastructure, you can -ignore this mail. +If you have not requested an account on the {{ config.ORGANISATION_NAME }} infrastructure, you can ignore this mail. diff --git a/uffd/translations/de/LC_MESSAGES/messages.mo b/uffd/translations/de/LC_MESSAGES/messages.mo index df2fed3467524abc4c2f938fd07bb2cad81b9f2c..9cdebd124e7c7ac941996b37a6bcb206147b1db2 100644 Binary files a/uffd/translations/de/LC_MESSAGES/messages.mo and b/uffd/translations/de/LC_MESSAGES/messages.mo differ diff --git a/uffd/translations/de/LC_MESSAGES/messages.po b/uffd/translations/de/LC_MESSAGES/messages.po index cec4ea943370b3ff0c83f10992728efb3a8abd33..1085b4cc29b2579b1277de4c129a94c54e90d167 100644 --- a/uffd/translations/de/LC_MESSAGES/messages.po +++ b/uffd/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-07-30 21:15+0200\n" +"POT-Creation-Date: 2021-07-31 02:43+0200\n" "PO-Revision-Date: 2021-05-25 21:18+0200\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language: de\n" @@ -303,6 +303,11 @@ msgstr "Abbrechen" msgid "Invite Link" msgstr "Einladungslink" +#: uffd/invite/templates/invite/use.html:14 +#, python-format +msgid "Welcome to the %(org_name)s Single-Sign-On!" +msgstr "Willkommen im %(org_name)s Single-Sign-On!" + #: uffd/invite/templates/invite/use.html:18 msgid "" "With this link you can register a new user account with the following "