Remove useless check in SetPassword()

This commit is contained in:
Yang Luo
2023-06-17 00:58:31 +08:00
parent 0f57ac297b
commit a932b76fba
12 changed files with 11 additions and 26 deletions

View File

@ -410,10 +410,6 @@ func (c *ApiController) SetPassword() {
c.ResponseError(c.T("user:New password cannot contain blank space.")) c.ResponseError(c.T("user:New password cannot contain blank space."))
return return
} }
if len(newPassword) <= 5 {
c.ResponseError(c.T("user:New password must have at least 6 characters"))
return
}
userId := util.GetId(userOwner, userName) userId := util.GetId(userOwner, userName)

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Anzeigename darf nicht leer sein", "Display name cannot be empty": "Anzeigename darf nicht leer sein",
"New password cannot contain blank space.": "Das neue Passwort darf keine Leerzeichen enthalten.", "New password cannot contain blank space.": "Das neue Passwort darf keine Leerzeichen enthalten."
"New password must have at least 6 characters": "Das neue Passwort muss mindestens 6 Zeichen haben"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Fehler beim Importieren von Benutzern" "Failed to import users": "Fehler beim Importieren von Benutzern"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Display name cannot be empty", "Display name cannot be empty": "Display name cannot be empty",
"New password cannot contain blank space.": "New password cannot contain blank space.", "New password cannot contain blank space.": "New password cannot contain blank space."
"New password must have at least 6 characters": "New password must have at least 6 characters"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Failed to import users" "Failed to import users": "Failed to import users"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "El nombre de pantalla no puede estar vacío", "Display name cannot be empty": "El nombre de pantalla no puede estar vacío",
"New password cannot contain blank space.": "La nueva contraseña no puede contener espacios en blanco.", "New password cannot contain blank space.": "La nueva contraseña no puede contener espacios en blanco."
"New password must have at least 6 characters": "La nueva contraseña debe tener al menos 6 caracteres"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Error al importar usuarios" "Failed to import users": "Error al importar usuarios"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Le nom d'affichage ne peut pas être vide", "Display name cannot be empty": "Le nom d'affichage ne peut pas être vide",
"New password cannot contain blank space.": "Le nouveau mot de passe ne peut pas contenir d'espace.", "New password cannot contain blank space.": "Le nouveau mot de passe ne peut pas contenir d'espace."
"New password must have at least 6 characters": "Le nouveau mot de passe doit comporter au moins 6 caractères"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Échec de l'importation des utilisateurs" "Failed to import users": "Échec de l'importation des utilisateurs"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Nama tampilan tidak boleh kosong", "Display name cannot be empty": "Nama tampilan tidak boleh kosong",
"New password cannot contain blank space.": "Kata sandi baru tidak boleh mengandung spasi kosong.", "New password cannot contain blank space.": "Kata sandi baru tidak boleh mengandung spasi kosong."
"New password must have at least 6 characters": "Kata sandi baru harus memiliki setidaknya 6 karakter"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Gagal mengimpor pengguna" "Failed to import users": "Gagal mengimpor pengguna"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "表示名は空にできません", "Display name cannot be empty": "表示名は空にできません",
"New password cannot contain blank space.": "新しいパスワードにはスペースを含めることはできません。", "New password cannot contain blank space.": "新しいパスワードにはスペースを含めることはできません。"
"New password must have at least 6 characters": "新しいパスワードは少なくとも6文字必要です"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "ユーザーのインポートに失敗しました" "Failed to import users": "ユーザーのインポートに失敗しました"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "디스플레이 이름은 비어 있을 수 없습니다", "Display name cannot be empty": "디스플레이 이름은 비어 있을 수 없습니다",
"New password cannot contain blank space.": "새 비밀번호에는 공백이 포함될 수 없습니다.", "New password cannot contain blank space.": "새 비밀번호에는 공백이 포함될 수 없습니다."
"New password must have at least 6 characters": "새로운 비밀번호는 최소 6자 이상이어야 합니다"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "사용자 가져오기를 실패했습니다" "Failed to import users": "사용자 가져오기를 실패했습니다"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Display name cannot be empty", "Display name cannot be empty": "Display name cannot be empty",
"New password cannot contain blank space.": "New password cannot contain blank space.", "New password cannot contain blank space.": "New password cannot contain blank space."
"New password must have at least 6 characters": "New password must have at least 6 characters"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Failed to import users" "Failed to import users": "Failed to import users"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Отображаемое имя не может быть пустым", "Display name cannot be empty": "Отображаемое имя не может быть пустым",
"New password cannot contain blank space.": "Новый пароль не может содержать пробелы.", "New password cannot contain blank space.": "Новый пароль не может содержать пробелы."
"New password must have at least 6 characters": "Новый пароль должен содержать не менее 6 символов"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Не удалось импортировать пользователей" "Failed to import users": "Не удалось импортировать пользователей"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "Tên hiển thị không thể trống", "Display name cannot be empty": "Tên hiển thị không thể trống",
"New password cannot contain blank space.": "Mật khẩu mới không thể chứa dấu trắng.", "New password cannot contain blank space.": "Mật khẩu mới không thể chứa dấu trắng."
"New password must have at least 6 characters": "Mật khẩu mới phải có ít nhất 6 ký tự"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "Không thể nhập người dùng" "Failed to import users": "Không thể nhập người dùng"

View File

@ -120,8 +120,7 @@
}, },
"user": { "user": {
"Display name cannot be empty": "显示名称不可为空", "Display name cannot be empty": "显示名称不可为空",
"New password cannot contain blank space.": "新密码不可以包含空格", "New password cannot contain blank space.": "新密码不可以包含空格"
"New password must have at least 6 characters": "新密码至少需要6位字符"
}, },
"user_upload": { "user_upload": {
"Failed to import users": "导入用户失败" "Failed to import users": "导入用户失败"