feat: improve default org passwordOptions handling

This commit is contained in:
Yang Luo 2025-02-12 21:20:32 +08:00
parent c0ec73dfd3
commit 9c46344e68
3 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ func checkPasswordComplexity(password string, options []string) string {
} }
if len(options) == 0 { if len(options) == 0 {
options = []string{"AtLeast6"} return ""
} }
checkers := map[string]ValidatorFunc{ checkers := map[string]ValidatorFunc{

View File

@ -34,7 +34,7 @@ class OrganizationListPage extends BaseListPage {
favicon: `${Setting.StaticBaseUrl}/img/favicon.png`, favicon: `${Setting.StaticBaseUrl}/img/favicon.png`,
passwordType: "plain", passwordType: "plain",
PasswordSalt: "", PasswordSalt: "",
passwordOptions: [], passwordOptions: ["AtLeast6"],
passwordObfuscatorType: "Plain", passwordObfuscatorType: "Plain",
passwordObfuscatorKey: "", passwordObfuscatorKey: "",
passwordExpireDays: 0, passwordExpireDays: 0,

View File

@ -58,7 +58,7 @@ export function checkPasswordComplexity(password, options) {
} }
if (!options || options.length === 0) { if (!options || options.length === 0) {
options = ["AtLeast6"]; return "";
} }
const checkers = { const checkers = {