Skip to content

Commit 594f591

Browse files
segevfinertechknowlogick
authored andcommitted
Increase Username and Orgname MaxSize 35 -> 40 (#6178)
* Increase Username and Orgname MaxSize 35 -> 40 Signed-off-by: Segev Finer <[email protected]> * Dep update code.gitea.io/sdk Signed-off-by: Segev Finer <[email protected]> * Run generate-swagger Signed-off-by: Segev Finer <[email protected]>
1 parent 795f6e0 commit 594f591

File tree

9 files changed

+47
-12
lines changed

9 files changed

+47
-12
lines changed

Gopkg.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/auth/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
type AdminCreateUserForm struct {
1515
LoginType string `binding:"Required"`
1616
LoginName string
17-
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
17+
UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"`
1818
Email string `binding:"Required;Email;MaxSize(254)"`
1919
Password string `binding:"MaxSize(255)"`
2020
SendNotify bool

modules/auth/org.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
// CreateOrgForm form for creating organization
2424
type CreateOrgForm struct {
25-
OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
25+
OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
2626
Visibility structs.VisibleType
2727
}
2828

@@ -33,7 +33,7 @@ func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) bind
3333

3434
// UpdateOrgSettingForm form for updating organization settings
3535
type UpdateOrgSettingForm struct {
36-
Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
36+
Name string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
3737
FullName string `binding:"MaxSize(100)"`
3838
Description string `binding:"MaxSize(255)"`
3939
Website string `binding:"ValidUrl;MaxSize(255)"`

modules/auth/user_form.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
7676

7777
// RegisterForm form for registering
7878
type RegisterForm struct {
79-
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
79+
UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"`
8080
Email string `binding:"Required;Email;MaxSize(254)"`
8181
Password string `binding:"Required;MaxSize(255)"`
8282
Retype string
@@ -146,7 +146,7 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding
146146

147147
// UpdateProfileForm form for updating profile
148148
type UpdateProfileForm struct {
149-
Name string `binding:"AlphaDashDot;MaxSize(35)"`
149+
Name string `binding:"AlphaDashDot;MaxSize(40)"`
150150
FullName string `binding:"MaxSize(100)"`
151151
Email string `binding:"Required;Email;MaxSize(254)"`
152152
KeepEmailPrivate bool

modules/auth/user_form_auth_openid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (f *SignInOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) b
2222

2323
// SignUpOpenIDForm form for signin up with OpenID
2424
type SignUpOpenIDForm struct {
25-
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
25+
UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"`
2626
Email string `binding:"Required;Email;MaxSize(254)"`
2727
GRecaptchaResponse string `form:"g-recaptcha-response"`
2828
}

templates/swagger/v1_json.tmpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6924,6 +6924,10 @@
69246924
"type": "string",
69256925
"x-go-name": "LoginName"
69266926
},
6927+
"must_change_password": {
6928+
"type": "boolean",
6929+
"x-go-name": "MustChangePassword"
6930+
},
69276931
"password": {
69286932
"type": "string",
69296933
"x-go-name": "Password"
@@ -7342,6 +7346,10 @@
73427346
"format": "int64",
73437347
"x-go-name": "MaxRepoCreation"
73447348
},
7349+
"must_change_password": {
7350+
"type": "boolean",
7351+
"x-go-name": "MustChangePassword"
7352+
},
73457353
"password": {
73467354
"type": "string",
73477355
"x-go-name": "Password"

vendor/code.gitea.io/sdk/gitea/admin_user.go

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/sdk/gitea/gitea.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/code.gitea.io/sdk/gitea/issue.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)