SSO LDAP: Add login form alert (#93037)

* add alert if login form is disabled

* add i18n texts
This commit is contained in:
linoman 2024-09-06 15:13:22 +02:00 committed by GitHub
parent 8b2091ee4f
commit 9b2c2be82d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 0 deletions

View File

@ -218,9 +218,19 @@ export const LdapSettingsPage = () => {
</Trans>
);
const disabledFormAlert = (
<Alert title={t('ldap-settings-page.login-form-alert.title', 'Basic login disabled')}>
<Trans i18nKey="ldap-settings-page.login-form-alert.description">
Your LDAP configuration is not working because the basic login form is currently disabled. Please enable the
login form to use LDAP authentication. You can enable it on the Authentication page under Auth settings.
</Trans>
</Alert>
);
return (
<Page navId="authentication" pageNav={pageNav} subTitle={subTitle}>
<Page.Contents>
{config.disableLoginForm && disabledFormAlert}
<FormProvider {...methods}>
<form onSubmit={handleSubmit(submitAndEnableLdapSettings, onErrors)}>
{isLoading && <Loader />}

View File

@ -1133,6 +1133,10 @@
"label": "Server host",
"placeholder": "example: 127.0.0.1"
},
"login-form-alert": {
"description": "Your LDAP configuration is not working because the basic login form is currently disabled. Please enable the login form to use LDAP authentication. You can enable it on the Authentication page under “Auth settings”.",
"title": "Basic login disabled"
},
"search_filter": {
"description": "LDAP search filter used to locate specific entries within the directory.",
"label": "Search filter*",

View File

@ -1133,6 +1133,10 @@
"label": "Ŝęřvęř ĥőşŧ",
"placeholder": "ęχämpľę: 127.0.0.1"
},
"login-form-alert": {
"description": "Ÿőūř ĿĐÅP čőʼnƒįģūřäŧįőʼn įş ʼnőŧ ŵőřĸįʼnģ þęčäūşę ŧĥę þäşįč ľőģįʼn ƒőřm įş čūřřęʼnŧľy đįşäþľęđ. Pľęäşę ęʼnäþľę ŧĥę ľőģįʼn ƒőřm ŧő ūşę ĿĐÅP äūŧĥęʼnŧįčäŧįőʼn. Ÿőū čäʼn ęʼnäþľę įŧ őʼn ŧĥę Åūŧĥęʼnŧįčäŧįőʼn päģę ūʼnđęř “Åūŧĥ şęŧŧįʼnģş”.",
"title": "ßäşįč ľőģįʼn đįşäþľęđ"
},
"search_filter": {
"description": "ĿĐÅP şęäřčĥ ƒįľŧęř ūşęđ ŧő ľőčäŧę şpęčįƒįč ęʼnŧřįęş ŵįŧĥįʼn ŧĥę đįřęčŧőřy.",
"label": "Ŝęäřčĥ ƒįľŧęř*",