mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: improve default org passwordOptions handling
This commit is contained in:
parent
c0ec73dfd3
commit
9c46344e68
@ -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{
|
||||||
|
@ -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,
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user