From d3a617efd61ab198ef77c68502809c4c6dab0b4b Mon Sep 17 00:00:00 2001 From: peimingming Date: Fri, 26 Oct 2018 17:07:36 +0800 Subject: [PATCH] Support longer UserName Signed-off-by: peimingming --- src/core/api/user.go | 2 +- .../src/app/shared/new-user-form/new-user-form.component.html | 2 +- src/portal/src/i18n/lang/en-us-lang.json | 2 +- src/portal/src/i18n/lang/zh-cn-lang.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/api/user.go b/src/core/api/user.go index 62c48ec7e..a8d178fee 100644 --- a/src/core/api/user.go +++ b/src/core/api/user.go @@ -353,7 +353,7 @@ func (ua *UserAPI) modifiable() bool { // validate only validate when user register func validate(user models.User) error { - if isIllegalLength(user.Username, 1, 20) { + if isIllegalLength(user.Username, 1, 255) { return fmt.Errorf("username with illegal length") } if isContainIllegalChar(user.Username, []string{",", "~", "#", "$", "%"}) { diff --git a/src/portal/src/app/shared/new-user-form/new-user-form.component.html b/src/portal/src/app/shared/new-user-form/new-user-form.component.html index eb2bb2fbc..5e7c67e79 100644 --- a/src/portal/src/app/shared/new-user-form/new-user-form.component.html +++ b/src/portal/src/app/shared/new-user-form/new-user-form.component.html @@ -4,7 +4,7 @@