mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +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:
@ -1034,7 +1034,7 @@ class ApplicationEditPage extends React.Component {
|
||||
submitApplicationEdit(exitAfterSave) {
|
||||
const application = Setting.deepCopy(this.state.application);
|
||||
application.providers = application.providers?.filter(provider => this.state.providers.map(provider => provider.name).includes(provider.name));
|
||||
application.signinMethods = application.signinMethods?.filter(signinMethod => ["Password", "Verification code", "WebAuthn"].includes(signinMethod.name));
|
||||
application.signinMethods = application.signinMethods?.filter(signinMethod => ["Password", "Verification code", "WebAuthn", "LDAP"].includes(signinMethod.name));
|
||||
|
||||
ApplicationBackend.updateApplication("admin", this.state.applicationName, application)
|
||||
.then((res) => {
|
||||
|
@ -47,9 +47,10 @@ class ApplicationListPage extends BaseListPage {
|
||||
{name: "provider_captcha_default", canSignUp: false, canSignIn: false, canUnlink: false, prompted: false, signupGroup: "", rule: ""},
|
||||
],
|
||||
SigninMethods: [
|
||||
{name: "Password", displayName: "Password", rule: "None"},
|
||||
{name: "Password", displayName: "Password", rule: "All"},
|
||||
{name: "Verification code", displayName: "Verification code", rule: "All"},
|
||||
{name: "WebAuthn", displayName: "WebAuthn", rule: "None"},
|
||||
{name: "LDAP", displayName: "LDAP", rule: "None"},
|
||||
],
|
||||
signupItems: [
|
||||
{name: "ID", visible: false, required: true, rule: "Random"},
|
||||
|
@ -1155,6 +1155,14 @@ export function isWebAuthnEnabled(application) {
|
||||
}
|
||||
}
|
||||
|
||||
export function isLdapEnabled(application) {
|
||||
if (application) {
|
||||
return application.signinMethods.filter(item => item.name === "LDAP").length > 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function getLoginLink(application) {
|
||||
let url;
|
||||
if (application === null) {
|
||||
|
@ -213,6 +213,7 @@ class LoginPage extends React.Component {
|
||||
break;
|
||||
}
|
||||
case "WebAuthn": return "webAuthn";
|
||||
case "LDAP": return "ldap";
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,6 +225,7 @@ class LoginPage extends React.Component {
|
||||
case "verificationCode": return i18next.t("login:Email or phone");
|
||||
case "verificationCodeEmail": return i18next.t("login:Email");
|
||||
case "verificationCodePhone": return i18next.t("login:Phone");
|
||||
case "ldap": return i18next.t("login:LDAP username, Email or phone");
|
||||
default: return i18next.t("login:username, Email or phone");
|
||||
}
|
||||
}
|
||||
@ -253,6 +255,15 @@ class LoginPage extends React.Component {
|
||||
values["organization"] = this.getApplicationObj().organization;
|
||||
}
|
||||
|
||||
if (this.state.loginMethod === "password") {
|
||||
values["signinMethod"] = "Password";
|
||||
} else if (this.state.loginMethod?.includes("verificationCode")) {
|
||||
values["signinMethod"] = "Verification code";
|
||||
} else if (this.state.loginMethod === "webAuthn") {
|
||||
values["signinMethod"] = "WebAuthn";
|
||||
} else if (this.state.loginMethod === "ldap") {
|
||||
values["signinMethod"] = "LDAP";
|
||||
}
|
||||
const oAuthParams = Util.getOAuthGetParameters();
|
||||
|
||||
values["type"] = oAuthParams?.responseType ?? this.state.type;
|
||||
@ -329,7 +340,7 @@ class LoginPage extends React.Component {
|
||||
this.signInWithWebAuthn(username, values);
|
||||
return;
|
||||
}
|
||||
if (this.state.loginMethod === "password") {
|
||||
if (this.state.loginMethod === "password" || this.state.loginMethod === "ldap") {
|
||||
if (this.state.enableCaptchaModal === CaptchaRule.Always) {
|
||||
this.setState({
|
||||
openCaptchaModal: true,
|
||||
@ -507,7 +518,7 @@ class LoginPage extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
const showForm = Setting.isPasswordEnabled(application) || Setting.isCodeSigninEnabled(application) || Setting.isWebAuthnEnabled(application);
|
||||
const showForm = Setting.isPasswordEnabled(application) || Setting.isCodeSigninEnabled(application) || Setting.isWebAuthnEnabled(application) || Setting.isLdapEnabled(application);
|
||||
if (showForm) {
|
||||
let loginWidth = 320;
|
||||
if (Setting.getLanguage() === "fr") {
|
||||
@ -570,6 +581,7 @@ class LoginPage extends React.Component {
|
||||
switch (this.state.loginMethod) {
|
||||
case "verificationCodeEmail": return i18next.t("login:Please input your Email!");
|
||||
case "verificationCodePhone": return i18next.t("login:Please input your Phone!");
|
||||
case "ldap": return i18next.t("login:Please input your LDAP username!");
|
||||
default: return i18next.t("login:Please input your Email or Phone!");
|
||||
}
|
||||
},
|
||||
@ -870,7 +882,7 @@ class LoginPage extends React.Component {
|
||||
|
||||
renderPasswordOrCodeInput() {
|
||||
const application = this.getApplicationObj();
|
||||
if (this.state.loginMethod === "password") {
|
||||
if (this.state.loginMethod === "password" || this.state.loginMethod === "ldap") {
|
||||
return (
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
@ -881,7 +893,7 @@ class LoginPage extends React.Component {
|
||||
prefix={<LockOutlined className="site-form-item-icon" />}
|
||||
type="password"
|
||||
placeholder={i18next.t("general:Password")}
|
||||
disabled={!Setting.isPasswordEnabled(application)}
|
||||
disabled={this.state.loginMethod === "password" ? !Setting.isPasswordEnabled(application) : !Setting.isLdapEnabled(application)}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
@ -916,11 +928,13 @@ class LoginPage extends React.Component {
|
||||
};
|
||||
|
||||
const itemsMap = new Map([
|
||||
[generateItemKey("Password", "None"), {label: i18next.t("general:Password"), key: "password"}],
|
||||
[generateItemKey("Password", "All"), {label: i18next.t("general:Password"), key: "password"}],
|
||||
[generateItemKey("Password", "Non-LDAP"), {label: i18next.t("general:Password"), key: "password"}],
|
||||
[generateItemKey("Verification code", "All"), {label: i18next.t("login:Verification code"), key: "verificationCode"}],
|
||||
[generateItemKey("Verification code", "Email only"), {label: i18next.t("login:Verification code"), key: "verificationCodeEmail"}],
|
||||
[generateItemKey("Verification code", "Phone only"), {label: i18next.t("login:Verification code"), key: "verificationCodePhone"}],
|
||||
[generateItemKey("WebAuthn", "None"), {label: i18next.t("login:WebAuthn"), key: "webAuthn"}],
|
||||
[generateItemKey("LDAP", "None"), {label: i18next.t("login:LDAP"), key: "ldap"}],
|
||||
]);
|
||||
|
||||
application?.signinMethods.forEach((signinMethod) => {
|
||||
@ -1059,7 +1073,7 @@ class LoginPage extends React.Component {
|
||||
}
|
||||
|
||||
const visibleOAuthProviderItems = (application.providers === null) ? [] : application.providers.filter(providerItem => this.isProviderVisible(providerItem));
|
||||
if (this.props.preview !== "auto" && !Setting.isPasswordEnabled(application) && !Setting.isCodeSigninEnabled(application) && !Setting.isWebAuthnEnabled(application) && visibleOAuthProviderItems.length === 1) {
|
||||
if (this.props.preview !== "auto" && !Setting.isPasswordEnabled(application) && !Setting.isCodeSigninEnabled(application) && !Setting.isWebAuthnEnabled(application) && !Setting.isLdapEnabled(application) && visibleOAuthProviderItems.length === 1) {
|
||||
Setting.goToLink(Provider.getAuthUrl(application, visibleOAuthProviderItems[0].provider, "signup"));
|
||||
return (
|
||||
<div style={{display: "flex", justifyContent: "center", alignItems: "center", width: "100%"}}>
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Modelle",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Eindeutige, auf Strings basierende ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth-Provider",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Passwort vergessen?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Laden",
|
||||
"Logging out...": "Ausloggen...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Bitte geben Sie Ihre E-Mail oder Telefonnummer ein!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Bitte geben Sie Ihren Code ein!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Modelos",
|
||||
"Name": "Nombre",
|
||||
"Name - Tooltip": "ID único basado en cadenas",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "Proveedores de OAuth",
|
||||
"OK": "Vale",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "¿Olvidaste tu contraseña?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Cargando",
|
||||
"Logging out...": "Cerrando sesión...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "¡Por favor introduzca su correo electrónico o teléfono!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "¡Por favor ingrese su código!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Modèles",
|
||||
"Name": "Nom",
|
||||
"Name - Tooltip": "Identifiant unique à base de chaîne",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "Aucun",
|
||||
"OAuth providers": "Fournisseurs OAuth",
|
||||
"OK": "Ok",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Échec de l'obtention de l'autorisation MetaMask",
|
||||
"Failed to obtain Web3-Onboard authorization": "Échec de l'obtention de l'autorisation MetaMask",
|
||||
"Forgot password?": "Mot de passe oublié ?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Chargement",
|
||||
"Logging out...": "Déconnexion...",
|
||||
"MetaMask plugin not detected": "Le plugin MetaMask n'a pas été détecté",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Veuillez saisir votre adresse e-mail ou votre numéro de téléphone !",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Veuillez saisir votre code !",
|
||||
"Please input your organization name!": "Veuillez saisir le nom de votre organisation !",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Model-model",
|
||||
"Name": "Nama",
|
||||
"Name - Tooltip": "ID unik berbasis string",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "Penyedia OAuth",
|
||||
"OK": "Baik atau Oke",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Lupa kata sandi?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Memuat",
|
||||
"Logging out...": "Keluar...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Silahkan masukkan email atau nomor telepon Anda!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Silakan masukkan kode Anda!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "モデル",
|
||||
"Name": "名前",
|
||||
"Name - Tooltip": "ユニークで文字列ベースのID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuthプロバイダー",
|
||||
"OK": "了解",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "パスワードを忘れましたか?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "ローディング",
|
||||
"Logging out...": "ログアウト中...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "あなたのメールアドレスまたは電話番号を入力してください!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "あなたのコードを入力してください!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "모델들",
|
||||
"Name": "이름",
|
||||
"Name - Tooltip": "고유한 문자열 기반 ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth 공급자",
|
||||
"OK": "예",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "비밀번호를 잊으셨나요?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "로딩 중입니다",
|
||||
"Logging out...": "로그아웃 중...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "이메일 또는 전화번호를 입력해주세요!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "코드를 입력해주세요!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Modelos",
|
||||
"Name": "Nome",
|
||||
"Name - Tooltip": "ID único em formato de string",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "Provedores OAuth",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Esqueceu a senha?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Carregando",
|
||||
"Logging out...": "Saindo...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Por favor, informe seu email ou telefone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Por favor, informe o código!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Модели",
|
||||
"Name": "Имя",
|
||||
"Name - Tooltip": "Уникальный идентификатор на основе строки",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "Провайдеры OAuth",
|
||||
"OK": "OK - Хорошо",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Забыли пароль?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Загрузка",
|
||||
"Logging out...": "Выход...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Пожалуйста, введите свой адрес электронной почты или номер телефона!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Пожалуйста, введите свой код!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Unique, string-based ID",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Mô hình",
|
||||
"Name": "Tên",
|
||||
"Name - Tooltip": "ID duy nhất dựa trên chuỗi",
|
||||
"Non-LDAP": "Non-LDAP",
|
||||
"None": "None",
|
||||
"OAuth providers": "Nhà cung cấp OAuth",
|
||||
"OK": "Được rồi",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "Failed to obtain MetaMask authorization",
|
||||
"Failed to obtain Web3-Onboard authorization": "Failed to obtain Web3-Onboard authorization",
|
||||
"Forgot password?": "Quên mật khẩu?",
|
||||
"LDAP": "LDAP",
|
||||
"LDAP username, Email or phone": "LDAP username, Email or phone",
|
||||
"Loading": "Đang tải",
|
||||
"Logging out...": "Đăng xuất ...",
|
||||
"MetaMask plugin not detected": "MetaMask plugin not detected",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "Phone",
|
||||
"Please input your Email or Phone!": "Vui lòng nhập địa chỉ Email hoặc số điện thoại của bạn!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your LDAP username!": "Please input your LDAP username!",
|
||||
"Please input your Phone!": "Please input your Phone!",
|
||||
"Please input your code!": "Vui lòng nhập mã của bạn!",
|
||||
"Please input your organization name!": "Please input your organization name!",
|
||||
|
@ -265,6 +265,7 @@
|
||||
"Models": "Casbin模型",
|
||||
"Name": "名称",
|
||||
"Name - Tooltip": "唯一的、字符串式的ID",
|
||||
"Non-LDAP": "禁用LDAP",
|
||||
"None": "无",
|
||||
"OAuth providers": "OAuth提供方",
|
||||
"OK": "OK",
|
||||
@ -431,6 +432,8 @@
|
||||
"Failed to obtain MetaMask authorization": "获取MetaMask授权失败",
|
||||
"Failed to obtain Web3-Onboard authorization": "获取 Web3-Onboard 授权失败",
|
||||
"Forgot password?": "忘记密码?",
|
||||
"LDAP": "LDAP登录",
|
||||
"LDAP username, Email or phone": "LDAP用户名, Email或手机号",
|
||||
"Loading": "加载中",
|
||||
"Logging out...": "正在退出登录...",
|
||||
"MetaMask plugin not detected": "未检测到MetaMask插件",
|
||||
@ -439,6 +442,7 @@
|
||||
"Phone": "手机号",
|
||||
"Please input your Email or Phone!": "请输入您的Email或手机号!",
|
||||
"Please input your Email!": "请输入您的Email!",
|
||||
"Please input your LDAP username!": "请输入您的LDAP用户名!",
|
||||
"Please input your Phone!": "请输入您的手机号!",
|
||||
"Please input your code!": "请输入您的验证码!",
|
||||
"Please input your organization name!": "请输入组织的名字!",
|
||||
|
@ -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