mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user