From e5f9aab28f2f17b9bbfd29105d06480d31e0b2f4 Mon Sep 17 00:00:00 2001 From: DacongDA Date: Sun, 2 Jun 2024 01:00:55 +0800 Subject: [PATCH] feat: support resetting password on first login (#2980) * feat: support reset password in first login * feat: disable needUpdatePassword when user haven't email and phone and mfa --- controllers/auth.go | 8 +++++--- controllers/user.go | 4 +++- object/user.go | 5 +++-- object/user_util.go | 4 ++++ web/src/App.js | 1 + web/src/EntryPage.js | 4 ++-- web/src/ManagementPage.js | 2 ++ web/src/UserEditPage.js | 13 +++++++++++++ web/src/auth/AuthCallback.js | 23 ++++++++++++++++++++++- web/src/auth/ForgetPage.js | 8 ++++---- web/src/auth/LoginPage.js | 20 ++++++++++++++++++++ web/src/locales/ar/data.json | 4 +++- web/src/locales/de/data.json | 4 +++- web/src/locales/en/data.json | 4 +++- web/src/locales/es/data.json | 4 +++- web/src/locales/fa/data.json | 4 +++- web/src/locales/fi/data.json | 4 +++- web/src/locales/fr/data.json | 4 +++- web/src/locales/he/data.json | 4 +++- web/src/locales/id/data.json | 4 +++- web/src/locales/it/data.json | 4 +++- web/src/locales/ja/data.json | 4 +++- web/src/locales/kk/data.json | 4 +++- web/src/locales/ko/data.json | 4 +++- web/src/locales/ms/data.json | 4 +++- web/src/locales/nl/data.json | 4 +++- web/src/locales/pl/data.json | 4 +++- web/src/locales/pt/data.json | 4 +++- web/src/locales/ru/data.json | 4 +++- web/src/locales/sv/data.json | 4 +++- web/src/locales/tr/data.json | 4 +++- web/src/locales/uk/data.json | 4 +++- web/src/locales/vi/data.json | 4 +++- web/src/locales/zh/data.json | 4 +++- web/src/table/AccountTable.js | 1 + 35 files changed, 149 insertions(+), 36 deletions(-) diff --git a/controllers/auth.go b/controllers/auth.go index b40be6f2..747d0f2e 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -117,7 +117,7 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob if form.Type == ResponseTypeLogin { c.SetSessionUsername(userId) util.LogInfo(c.Ctx, "API: [%s] signed in", userId) - resp = &Response{Status: "ok", Msg: "", Data: userId} + resp = &Response{Status: "ok", Msg: "", Data: userId, Data2: user.NeedUpdatePassword} } else if form.Type == ResponseTypeCode { clientId := c.Input().Get("clientId") responseType := c.Input().Get("responseType") @@ -139,7 +139,7 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob } resp = codeToResponse(code) - + resp.Data2 = user.NeedUpdatePassword if application.EnableSigninSession || application.HasPromptPage() { // The prompt page needs the user to be signed in c.SetSessionUsername(userId) @@ -152,6 +152,8 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob nonce := c.Input().Get("nonce") token, _ := object.GetTokenByUser(application, user, scope, nonce, c.Ctx.Request.Host) resp = tokenToResponse(token) + + resp.Data2 = user.NeedUpdatePassword } } else if form.Type == ResponseTypeSaml { // saml flow res, redirectUrl, method, err := object.GetSamlResponse(application, user, form.SamlRequest, c.Ctx.Request.Host) @@ -159,7 +161,7 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob c.ResponseError(err.Error(), nil) return } - resp = &Response{Status: "ok", Msg: "", Data: res, Data2: map[string]string{"redirectUrl": redirectUrl, "method": method}} + resp = &Response{Status: "ok", Msg: "", Data: res, Data2: map[string]interface{}{"redirectUrl": redirectUrl, "method": method, "needUpdatePassword": user.NeedUpdatePassword}} if application.EnableSigninSession || application.HasPromptPage() { // The prompt page needs the user to be signed in diff --git a/controllers/user.go b/controllers/user.go index fd786607..373a4204 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -510,7 +510,9 @@ func (c *ApiController) SetPassword() { } targetUser.Password = newPassword - _, err = object.SetUserField(targetUser, "password", targetUser.Password) + targetUser.NeedUpdatePassword = false + + _, err = object.UpdateUser(userId, targetUser, []string{"password", "need_update_password"}, false) if err != nil { c.ResponseError(err.Error()) return diff --git a/object/user.go b/object/user.go index c9fb6396..91a4c77d 100644 --- a/object/user.go +++ b/object/user.go @@ -203,7 +203,8 @@ type User struct { LastSigninWrongTime string `xorm:"varchar(100)" json:"lastSigninWrongTime"` SigninWrongTimes int `json:"signinWrongTimes"` - ManagedAccounts []ManagedAccount `xorm:"managedAccounts blob" json:"managedAccounts"` + ManagedAccounts []ManagedAccount `xorm:"managedAccounts blob" json:"managedAccounts"` + NeedUpdatePassword bool `json:"needUpdatePassword"` } type Userinfo struct { @@ -682,7 +683,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er "eveonline", "fitbit", "gitea", "heroku", "influxcloud", "instagram", "intercom", "kakao", "lastfm", "mailru", "meetup", "microsoftonline", "naver", "nextcloud", "onedrive", "oura", "patreon", "paypal", "salesforce", "shopify", "soundcloud", "spotify", "strava", "stripe", "type", "tiktok", "tumblr", "twitch", "twitter", "typetalk", "uber", "vk", "wepay", "xero", "yahoo", - "yammer", "yandex", "zoom", "custom", + "yammer", "yandex", "zoom", "custom", "need_update_password", } } if isAdmin { diff --git a/object/user_util.go b/object/user_util.go index addb691e..2d802546 100644 --- a/object/user_util.go +++ b/object/user_util.go @@ -411,6 +411,10 @@ func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang str item := GetAccountItemByName("Is deleted", organization) itemsChanged = append(itemsChanged, item) } + if oldUser.NeedUpdatePassword != newUser.NeedUpdatePassword { + item := GetAccountItemByName("Need update password", organization) + itemsChanged = append(itemsChanged, item) + } if oldUser.Score != newUser.Score { item := GetAccountItemByName("Score", organization) diff --git a/web/src/App.js b/web/src/App.js index 6f80beba..11d9b8bc 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -414,6 +414,7 @@ class App extends Component { } /> } /> } /> - this.renderHomeIfLoggedIn()} /> - this.renderHomeIfLoggedIn()} /> + } /> + } /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderHomeIfLoggedIn()} /> diff --git a/web/src/ManagementPage.js b/web/src/ManagementPage.js index e0919b8b..c88986a7 100644 --- a/web/src/ManagementPage.js +++ b/web/src/ManagementPage.js @@ -328,6 +328,8 @@ function ManagementPage(props) { return ; } else if (props.account === undefined) { return null; + } else if (props.account.needUpdatePassword) { + return ; } else { return component; } diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js index 83a5ea88..2bbb1445 100644 --- a/web/src/UserEditPage.js +++ b/web/src/UserEditPage.js @@ -1026,6 +1026,19 @@ class UserEditPage extends React.Component { ); + } else if (accountItem.name === "Need update password") { + return ( + + + {Setting.getLabel(i18next.t("user:Need update password"), i18next.t("user:Need update password - Tooltip"))} : + + + { + this.updateUserField("needUpdatePassword", checked); + }} /> + + + ); } } diff --git a/web/src/auth/AuthCallback.js b/web/src/auth/AuthCallback.js index 2f5a98f6..13bfdf55 100644 --- a/web/src/auth/AuthCallback.js +++ b/web/src/auth/AuthCallback.js @@ -153,21 +153,37 @@ class AuthCallback extends React.Component { // OAuth const oAuthParams = Util.getOAuthGetParameters(innerParams); const concatChar = oAuthParams?.redirectUri?.includes("?") ? "&" : "?"; + const signinUrl = localStorage.getItem("signinUrl"); + AuthBackend.login(body, oAuthParams) .then((res) => { if (res.status === "ok") { const responseType = this.getResponseType(); if (responseType === "login") { + if (res.data2) { + sessionStorage.setItem("signinUrl", signinUrl); + Setting.goToLinkSoft(this, `/forget/${applicationName}`); + return; + } Setting.showMessage("success", "Logged in successfully"); // Setting.goToLinkSoft(this, "/"); - const link = Setting.getFromLink(); Setting.goToLink(link); } else if (responseType === "code") { + if (res.data2) { + sessionStorage.setItem("signinUrl", signinUrl); + Setting.goToLinkSoft(this, `/forget/${applicationName}`); + return; + } const code = res.data; Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}code=${code}&state=${oAuthParams.state}`); // Setting.showMessage("success", `Authorization code: ${res.data}`); } else if (responseType === "token" || responseType === "id_token") { + if (res.data2) { + sessionStorage.setItem("signinUrl", signinUrl); + Setting.goToLinkSoft(this, `/forget/${applicationName}`); + return; + } const token = res.data; Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}${responseType}=${token}&state=${oAuthParams.state}&token_type=bearer`); } else if (responseType === "link") { @@ -181,6 +197,11 @@ class AuthCallback extends React.Component { relayState: oAuthParams.relayState, }); } else { + if (res.data2.needUpdatePassword) { + sessionStorage.setItem("signinUrl", signinUrl); + Setting.goToLinkSoft(this, `/forget/${applicationName}`); + return; + } const SAMLResponse = res.data; const redirectUri = res.data2.redirectUrl; Setting.goToLink(`${redirectUri}?SAMLResponse=${encodeURIComponent(SAMLResponse)}&RelayState=${oAuthParams.relayState}`); diff --git a/web/src/auth/ForgetPage.js b/web/src/auth/ForgetPage.js index b49ebf8d..88d2b7f6 100644 --- a/web/src/auth/ForgetPage.js +++ b/web/src/auth/ForgetPage.js @@ -35,8 +35,8 @@ class ForgetPage extends React.Component { classes: props, applicationName: props.applicationName ?? props.match.params?.applicationName, msg: null, - name: "", - username: "", + name: props.account ? props.account.name : "", + username: props.account ? props.account.name : "", phone: "", email: "", dest: "", @@ -44,7 +44,6 @@ class ForgetPage extends React.Component { verifyType: "", // "email", "phone" current: 0, }; - this.form = React.createRef(); } @@ -205,6 +204,7 @@ class ForgetPage extends React.Component { initialValues={{ application: application.name, organization: application.organization, + username: this.state.name, }} style={{width: "300px"}} size="large" @@ -488,7 +488,7 @@ class ForgetPage extends React.Component {
- {i18next.t("forget:Retrieve password")} + {i18next.t("forget:Reset password")}
diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 2a39e7e1..1bbd6568 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -68,6 +68,8 @@ class LoginPage extends React.Component { this.state.applicationName = props.match?.params?.casApplicationName; } + localStorage.setItem("signinUrl", window.location.href); + this.form = React.createRef(); } @@ -300,6 +302,12 @@ class LoginPage extends React.Component { return; } + if (resp.data2) { + sessionStorage.setItem("signinUrl", window.location.href); + Setting.goToLinkSoft(ths, `/forget/${application.name}`); + return; + } + if (Setting.hasPromptPage(application)) { AuthBackend.getAccount() .then((res) => { @@ -442,15 +450,27 @@ class LoginPage extends React.Component { const responseType = values["type"]; if (responseType === "login") { + if (res.data2) { + sessionStorage.setItem("signinUrl", window.location.href); + Setting.goToLink(this, `/forget/${this.state.applicationName}`); + } Setting.showMessage("success", i18next.t("application:Logged in successfully")); this.props.onLoginSuccess(); } else if (responseType === "code") { this.postCodeLoginAction(res); } else if (responseType === "token" || responseType === "id_token") { + if (res.data2) { + sessionStorage.setItem("signinUrl", window.location.href); + Setting.goToLink(this, `/forget/${this.state.applicationName}`); + } const amendatoryResponseType = responseType === "token" ? "access_token" : responseType; const accessToken = res.data; Setting.goToLink(`${oAuthParams.redirectUri}#${amendatoryResponseType}=${accessToken}&state=${oAuthParams.state}&token_type=bearer`); } else if (responseType === "saml") { + if (res.data2.needUpdatePassword) { + sessionStorage.setItem("signinUrl", window.location.href); + Setting.goToLink(this, `/forget/${this.state.applicationName}`); + } if (res.data2.method === "POST") { this.setState({ samlResponse: res.data, diff --git a/web/src/locales/ar/data.json b/web/src/locales/ar/data.json index 80778ed5..d9e815ea 100644 --- a/web/src/locales/ar/data.json +++ b/web/src/locales/ar/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/de/data.json b/web/src/locales/de/data.json index d0c1fb13..cc7140ef 100644 --- a/web/src/locales/de/data.json +++ b/web/src/locales/de/data.json @@ -166,7 +166,7 @@ "Next Step": "Nächster Schritt", "Please input your username!": "Bitte gib deinen Benutzernamen ein!", "Reset": "Zurücksetzen", - "Retrieve password": "Passwort abrufen", + "Reset password": "Passwort abrufen", "Unknown forget type": "Unbekannter Vergesslichkeitstyp", "Verify": "überprüfen" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Verwaltete Konten", "Modify password...": "Passwort ändern...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Neue E-Mail", "New Password": "Neues Passwort", "New User": "Neuer Benutzer", diff --git a/web/src/locales/en/data.json b/web/src/locales/en/data.json index 72ee96c4..d142e885 100644 --- a/web/src/locales/en/data.json +++ b/web/src/locales/en/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/es/data.json b/web/src/locales/es/data.json index aa712adb..038d9e36 100644 --- a/web/src/locales/es/data.json +++ b/web/src/locales/es/data.json @@ -166,7 +166,7 @@ "Next Step": "Siguiente paso", "Please input your username!": "¡Por favor, ingrese su nombre de usuario!", "Reset": "Restablecer", - "Retrieve password": "Recuperar contraseña", + "Reset password": "Reset password", "Unknown forget type": "Tipo de olvido desconocido", "Verify": "Verificar" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Cuentas gestionadas", "Modify password...": "Modificar contraseña...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Nuevo correo electrónico", "New Password": "Nueva contraseña", "New User": "Nuevo Usuario", diff --git a/web/src/locales/fa/data.json b/web/src/locales/fa/data.json index 265a49a7..61fc66b4 100644 --- a/web/src/locales/fa/data.json +++ b/web/src/locales/fa/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/fi/data.json b/web/src/locales/fi/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/fi/data.json +++ b/web/src/locales/fi/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/fr/data.json b/web/src/locales/fr/data.json index 01ce45f3..b66b51de 100644 --- a/web/src/locales/fr/data.json +++ b/web/src/locales/fr/data.json @@ -166,7 +166,7 @@ "Next Step": "Étape suivante", "Please input your username!": "Veuillez saisir votre identifiant !", "Reset": "Réinitialiser", - "Retrieve password": "Récupérer le mot de passe", + "Reset password": "Récupérer le mot de passe", "Unknown forget type": "Type d'oubli inconnu", "Verify": "Vérifier" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Comptes gérés", "Modify password...": "Modifier le mot de passe...", "Multi-factor authentication": "Authentification multifacteur", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Nouvelle adresse e-mail", "New Password": "Nouveau mot de passe", "New User": "Nouveau compte", diff --git a/web/src/locales/he/data.json b/web/src/locales/he/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/he/data.json +++ b/web/src/locales/he/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/id/data.json b/web/src/locales/id/data.json index 7afef902..a538eaf9 100644 --- a/web/src/locales/id/data.json +++ b/web/src/locales/id/data.json @@ -166,7 +166,7 @@ "Next Step": "Langkah selanjutnya", "Please input your username!": "Silakan masukkan nama pengguna Anda!", "Reset": "Menyetel-ulang", - "Retrieve password": "Mengambil password", + "Reset password": "Mengambil password", "Unknown forget type": "Tipe yang tidak diketahui terlupakan", "Verify": "Memverifikasi" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Akun yang dikelola", "Modify password...": "Mengubah kata sandi...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Email baru", "New Password": "Kata Sandi Baru", "New User": "Pengguna Baru", diff --git a/web/src/locales/it/data.json b/web/src/locales/it/data.json index c959ab7d..26c5cd1b 100644 --- a/web/src/locales/it/data.json +++ b/web/src/locales/it/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/ja/data.json b/web/src/locales/ja/data.json index faada572..a1db847c 100644 --- a/web/src/locales/ja/data.json +++ b/web/src/locales/ja/data.json @@ -166,7 +166,7 @@ "Next Step": "次のステップ", "Please input your username!": "ユーザー名を入力してください!", "Reset": "リセット", - "Retrieve password": "パスワードの取得", + "Reset password": "パスワードの取得", "Unknown forget type": "未知の忘却タイプ", "Verify": "検証" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "管理アカウント", "Modify password...": "パスワードを変更する...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "新しいメール", "New Password": "新しいパスワード", "New User": "新しいユーザー", diff --git a/web/src/locales/kk/data.json b/web/src/locales/kk/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/kk/data.json +++ b/web/src/locales/kk/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/ko/data.json b/web/src/locales/ko/data.json index 43ac3982..35192bf4 100644 --- a/web/src/locales/ko/data.json +++ b/web/src/locales/ko/data.json @@ -166,7 +166,7 @@ "Next Step": "다음 단계", "Please input your username!": "사용자 이름을 입력하세요!", "Reset": "리셋", - "Retrieve password": "비밀번호를 복구하세요", + "Reset password": "비밀번호를 복구하세요", "Unknown forget type": "미지의 잊혀진 유형", "Verify": "검증하다" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "관리 계정", "Modify password...": "비밀번호 수정하기...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "새 이메일", "New Password": "새로운 비밀번호", "New User": "새로운 사용자", diff --git a/web/src/locales/ms/data.json b/web/src/locales/ms/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/ms/data.json +++ b/web/src/locales/ms/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/nl/data.json b/web/src/locales/nl/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/nl/data.json +++ b/web/src/locales/nl/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/pl/data.json b/web/src/locales/pl/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/pl/data.json +++ b/web/src/locales/pl/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/pt/data.json b/web/src/locales/pt/data.json index f105572d..936c12fc 100644 --- a/web/src/locales/pt/data.json +++ b/web/src/locales/pt/data.json @@ -166,7 +166,7 @@ "Next Step": "Próxima Etapa", "Please input your username!": "Por favor, insira seu nome de usuário!", "Reset": "Redefinir", - "Retrieve password": "Recuperar senha", + "Reset password": "Recuperar senha", "Unknown forget type": "Tipo de recuperação desconhecido", "Verify": "Verificar" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Contas gerenciadas", "Modify password...": "Modificar senha...", "Multi-factor authentication": "Autenticação de vários fatores", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Novo E-mail", "New Password": "Nova Senha", "New User": "Novo Usuário", diff --git a/web/src/locales/ru/data.json b/web/src/locales/ru/data.json index caa6a87e..6586ea94 100644 --- a/web/src/locales/ru/data.json +++ b/web/src/locales/ru/data.json @@ -166,7 +166,7 @@ "Next Step": "Следующий шаг", "Please input your username!": "Пожалуйста, введите своё имя пользователя!", "Reset": "Сбросить", - "Retrieve password": "Восстановить пароль", + "Reset password": "Восстановить пароль", "Unknown forget type": "Неизвестный забытый тип", "Verify": "Проверить" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Управляемые аккаунты", "Modify password...": "Изменить пароль...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Новое электронное письмо", "New Password": "Новый пароль", "New User": "Новый пользователь", diff --git a/web/src/locales/sv/data.json b/web/src/locales/sv/data.json index dd14850b..1503a94d 100644 --- a/web/src/locales/sv/data.json +++ b/web/src/locales/sv/data.json @@ -166,7 +166,7 @@ "Next Step": "Next Step", "Please input your username!": "Please input your username!", "Reset": "Reset", - "Retrieve password": "Retrieve password", + "Reset password": "Reset password", "Unknown forget type": "Unknown forget type", "Verify": "Verify" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/tr/data.json b/web/src/locales/tr/data.json index e859adda..ecb1a8f7 100644 --- a/web/src/locales/tr/data.json +++ b/web/src/locales/tr/data.json @@ -166,7 +166,7 @@ "Next Step": "Sonraki adım", "Please input your username!": "Lütfen kullanıcı adınızı girin", "Reset": "Sıfırla", - "Retrieve password": "Şifre kurtar", + "Reset password": "Şifre kurtar", "Unknown forget type": "Unknown forget type", "Verify": "Doğrula" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Managed accounts", "Modify password...": "Modify password...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "New Email", "New Password": "New Password", "New User": "New User", diff --git a/web/src/locales/uk/data.json b/web/src/locales/uk/data.json index 424183ee..f3f4e54d 100644 --- a/web/src/locales/uk/data.json +++ b/web/src/locales/uk/data.json @@ -166,7 +166,7 @@ "Next Step": "Наступний крок", "Please input your username!": "Будь ласка, введіть своє ім'я користувача!", "Reset": "Скинути", - "Retrieve password": "Отримати пароль", + "Reset password": "Отримати пароль", "Unknown forget type": "Невідомий забутий тип", "Verify": "Підтвердити" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Керовані облікові записи", "Modify password...": "Змінити пароль...", "Multi-factor authentication": "Багатофакторна аутентифікація", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Нова електронна пошта", "New Password": "Новий пароль", "New User": "Новий користувач", diff --git a/web/src/locales/vi/data.json b/web/src/locales/vi/data.json index 3dcd793a..d5416ecf 100644 --- a/web/src/locales/vi/data.json +++ b/web/src/locales/vi/data.json @@ -166,7 +166,7 @@ "Next Step": "Bước tiếp theo", "Please input your username!": "Vui lòng nhập tên đăng nhập của bạn!", "Reset": "Đặt lại", - "Retrieve password": "Truy xuất mật khẩu", + "Reset password": "Truy xuất mật khẩu", "Unknown forget type": "Loại quên chưa biết", "Verify": "Xác thực" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "Quản lý tài khoản", "Modify password...": "Sửa đổi mật khẩu...", "Multi-factor authentication": "Multi-factor authentication", + "Need update password": "Need update password", + "Need update password - Tooltip": "Force user update password after login", "New Email": "Email mới", "New Password": "Mật khẩu mới", "New User": "Người dùng mới", diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index b7b65d6c..e75aae30 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -166,7 +166,7 @@ "Next Step": "下一步", "Please input your username!": "请输入您的用户名!", "Reset": "重置", - "Retrieve password": "找回密码", + "Reset password": "重置密码", "Unknown forget type": "未知的忘记密码类型", "Verify": "验证" }, @@ -1130,6 +1130,8 @@ "Managed accounts": "托管账户", "Modify password...": "编辑密码...", "Multi-factor authentication": "多因素认证", + "Need update password": "需要更新密码", + "Need update password - Tooltip": "强制用户在登录后更新密码", "New Email": "新邮箱", "New Password": "新密码", "New User": "添加用户", diff --git a/web/src/table/AccountTable.js b/web/src/table/AccountTable.js index 22cbba24..98dd8524 100644 --- a/web/src/table/AccountTable.js +++ b/web/src/table/AccountTable.js @@ -102,6 +102,7 @@ class AccountTable extends React.Component { {name: "Is admin", label: i18next.t("user:Is admin")}, {name: "Is forbidden", label: i18next.t("user:Is forbidden")}, {name: "Is deleted", label: i18next.t("user:Is deleted")}, + {name: "Need update password", label: i18next.t("user:Need update password")}, {name: "Multi-factor authentication", label: i18next.t("user:Multi-factor authentication")}, {name: "WebAuthn credentials", label: i18next.t("user:WebAuthn credentials")}, {name: "Managed accounts", label: i18next.t("user:Managed accounts")},