Skip to content

Commit

Permalink
Stop hardcoding agdsn.me
Browse files Browse the repository at this point in the history
  • Loading branch information
FestplattenSchnitzel committed Feb 5, 2024
1 parent 3e1cf50 commit 25963a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sipa/blueprints/usersuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def subscribe():

email = current_user.mail.raw_value
if email == "":
email = f"{current_user.login.raw_value}@agdsn.me"
email = f"{current_user.login.raw_value}@{current_user.datasource.mail_server}"

result = subscribe_to_status_page(
current_app.config['STATUS_PAGE_API_SUBSCRIBE_ENDPOINT'],
Expand Down
13 changes: 9 additions & 4 deletions sipa/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,15 @@ class ChangeMailForm(FlaskForm):
validators=[DataRequired(lazy_gettext("Passwort nicht angegeben!"))])
email = EmailField(label=lazy_gettext("E-Mail-Adresse"))
forwarded = BooleanField(
label=LocalProxy(lambda:
lazy_gettext("Mails für mein AG DSN E-Mail-Konto ({agdsn_email}) an private "
"E-Mail-Adresse weiterleiten")
.format(agdsn_email=f'{current_user.login.value}@agdsn.me')))
label=LocalProxy(
lambda: lazy_gettext(
"Mails für mein AG DSN E-Mail-Konto ({agdsn_email}) an private "
"E-Mail-Adresse weiterleiten"
).format(
agdsn_email=f"{current_user.login.value}@{current_user.datasource.mail_server}"
)
)
)


def require_unicast_mac(form, field):
Expand Down

0 comments on commit 25963a6

Please sign in to comment.