mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-29 19:23:52 +02:00
Merge remote-tracking branch 'upstream/main' into limit-repo-size
This commit is contained in:
@@ -41,6 +41,7 @@ type AdminEditUserForm struct {
|
||||
Password string `binding:"MaxSize(255)"`
|
||||
Website string `binding:"ValidUrl;MaxSize(255)"`
|
||||
Location string `binding:"MaxSize(50)"`
|
||||
Language string `binding:"MaxSize(5)"`
|
||||
MaxRepoCreation int
|
||||
Active bool
|
||||
Admin bool
|
||||
|
||||
@@ -150,6 +150,7 @@ type RepoSettingForm struct {
|
||||
ExternalTrackerRegexpPattern string
|
||||
EnableCloseIssuesViaCommitInAnyBranch bool
|
||||
EnableProjects bool
|
||||
ProjectsMode string
|
||||
EnableReleases bool
|
||||
EnablePackages bool
|
||||
EnablePulls bool
|
||||
|
||||
@@ -449,3 +449,14 @@ func (f *PackageSettingForm) Validate(req *http.Request, errs binding.Errors) bi
|
||||
ctx := context.GetValidateContext(req)
|
||||
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
type BlockUserForm struct {
|
||||
Action string `binding:"Required;In(block,unblock,note)"`
|
||||
Blockee string `binding:"Required"`
|
||||
Note string
|
||||
}
|
||||
|
||||
func (f *BlockUserForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
|
||||
ctx := context.GetValidateContext(req)
|
||||
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user