misc: fix "remotre" typo in authenticator condition (#77834) #61

Merged
fpeters merged 1 commits from wip/77834-remotre-typo into main 2023-05-23 14:04:17 +02:00
4 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@ class Migration(migrations.Migration):
default='',
help_text=(
'Django template controlling authenticator display. For example, "\'backoffice\' '
'in login_hint or remotre_addr == \'1.2.3.4\'" would hide the authenticator from '
'in login_hint or remote_addr == \'1.2.3.4\'" would hide the authenticator from '
'normal users except if they come from the specified IP address. Available '
'variables include service_ou_slug, service_slug, remote_addr, login_hint and '
'headers.'

View File

@ -64,7 +64,7 @@ class BaseAuthenticator(models.Model):
default='',
help_text=_(
'Django template controlling authenticator display. For example, "\'backoffice\' in '
'login_hint or remotre_addr == \'1.2.3.4\'" would hide the authenticator from normal users '
'login_hint or remote_addr == \'1.2.3.4\'" would hide the authenticator from normal users '
'except if they come from the specified IP address. Available variables include '
'service_ou_slug, service_slug, remote_addr, login_hint and headers.'
),

View File

@ -810,13 +810,13 @@ msgstr "Condition daffichage"
#: src/authentic2/apps/authenticators/models.py
msgid ""
"Django template controlling authenticator display. For example, "
"\"'backoffice' in login_hint or remotre_addr == '1.2.3.4'\" would hide the "
"\"'backoffice' in login_hint or remote_addr == '1.2.3.4'\" would hide the "
"authenticator from normal users except if they come from the specified IP "
"address. Available variables include service_ou_slug, service_slug, "
"remote_addr, login_hint and headers."
msgstr ""
"Gabarit pour contrôler laffichage du moyen dauthentification. Par exemple, "
"« 'backoffice' in login_hint or remotre_addr == '1.2.3.4' » le masquera aux "
"« 'backoffice' in login_hint or remote_addr == '1.2.3.4' » le masquera aux "
"yeux des usagers sauf s'ils viennent de ladresse IP spécifiée. Les "
"variables disponibles sont : include service_ou_slug, service_slug, "
"remote_addr, login_hint et headers."

View File

@ -88,18 +88,18 @@ def test_authenticators_password(app, superuser_or_admin):
resp = resp.form.submit()
assert "could not parse expression: unmatched" in resp.text
resp.form['show_condition'] = "'backoffice' in login_hint or remotre_addr == '1.2.3.4'"
resp.form['show_condition'] = "'backoffice' in login_hint or remote_addr == '1.2.3.4'"
resp = resp.form.submit().follow()
assert 'Click "Edit" to change configuration.' not in resp.text
if DJ_VERSION[0] <= 2:
assert (
"Show condition: &#39;backoffice&#39; in login_hint or remotre_addr == &#39;1.2.3.4&#39;"
"Show condition: &#39;backoffice&#39; in login_hint or remote_addr == &#39;1.2.3.4&#39;"
in resp.text
)
else:
# html-rendered quote characters change in django 3 onwards…
assert (
"Show condition: &#x27;backoffice&#x27; in login_hint or remotre_addr == &#x27;1.2.3.4&#x27;"
"Show condition: &#x27;backoffice&#x27; in login_hint or remote_addr == &#x27;1.2.3.4&#x27;"
in resp.text
)
assert_event('authenticator.edit', user=superuser_or_admin, session=app.session)