misc: fix "remotre" typo in authenticator condition (#77834) #61
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
),
|
||||
|
|
|
@ -810,13 +810,13 @@ msgstr "Condition d’affichage"
|
|||
#: 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 l’affichage du moyen d’authentification. 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 l’adresse IP spécifiée. Les "
|
||||
"variables disponibles sont : include service_ou_slug, service_slug, "
|
||||
"remote_addr, login_hint et headers."
|
||||
|
|
|
@ -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: 'backoffice' in login_hint or remotre_addr == '1.2.3.4'"
|
||||
"Show condition: 'backoffice' in login_hint or remote_addr == '1.2.3.4'"
|
||||
in resp.text
|
||||
)
|
||||
else:
|
||||
# html-rendered quote characters change in django 3 onwards…
|
||||
assert (
|
||||
"Show condition: 'backoffice' in login_hint or remotre_addr == '1.2.3.4'"
|
||||
"Show condition: 'backoffice' in login_hint or remote_addr == '1.2.3.4'"
|
||||
in resp.text
|
||||
)
|
||||
assert_event('authenticator.edit', user=superuser_or_admin, session=app.session)
|
||||
|
|
Loading…
Reference in New Issue