feat: add LDAP signin method (#2591)

Add support for LDAP login methods
Add option to control LDAP user in password login method.
This commit is contained in:
HGZ-20
2024-01-08 21:07:34 +08:00
committed by GitHub
parent 0199ad9aaa
commit ffa54247cd
57 changed files with 216 additions and 15 deletions

View File

@ -70,6 +70,7 @@ class SigninTable extends React.Component {
{name: "Password", displayName: i18next.t("general:Password")},
{name: "Verification code", displayName: i18next.t("login:Verification code")},
{name: "WebAuthn", displayName: i18next.t("login:WebAuthn")},
{name: "LDAP", displayName: i18next.t("login:LDAP")},
];
const columns = [
{
@ -91,7 +92,7 @@ class SigninTable extends React.Component {
onChange={value => {
this.updateField(table, index, "name", value);
this.updateField(table, index, "displayName", value);
if (value === "Verification code") {
if (value === "Verification code" || value === "Password") {
this.updateField(table, index, "rule", "All");
} else {
this.updateField(table, index, "rule", "None");
@ -130,6 +131,11 @@ class SigninTable extends React.Component {
{id: "Email only", name: i18next.t("general:Email only")},
{id: "Phone only", name: i18next.t("general:Phone only")},
];
} else if (record.name === "Password") {
options = [
{id: "All", name: i18next.t("general:All")},
{id: "Non-LDAP", name: i18next.t("general:Non-LDAP")},
];
}
if (options.length === 0) {