aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth/admin.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-03 18:40:52 -0500
committerUnknwon <u@gogs.io>2015-11-03 18:40:52 -0500
commit6f0a41b8b28ba33382ab8d655c0d015324be7647 (patch)
treed30191b529354c42aaf8ae4066d73b402c0b4bb2 /modules/auth/admin.go
parent25ec20d5251511ebd0b9e6b963e189b860c39704 (diff)
downloadgitea-6f0a41b8b28ba33382ab8d655c0d015324be7647.tar.gz
gitea-6f0a41b8b28ba33382ab8d655c0d015324be7647.zip
#1511 Allow local import only for admin users
Diffstat (limited to 'modules/auth/admin.go')
-rw-r--r--modules/auth/admin.go21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go
index c2d47a44fd..1530212bf3 100644
--- a/modules/auth/admin.go
+++ b/modules/auth/admin.go
@@ -24,16 +24,17 @@ func (f *AdminCrateUserForm) Validate(ctx *macaron.Context, errs binding.Errors)
}
type AdminEditUserForm struct {
- LoginType string `binding:"Required"`
- LoginName string
- FullName string `binding:"MaxSize(100)"`
- Email string `binding:"Required;Email;MaxSize(254)"`
- Password string `binding:"MaxSize(255)"`
- Website string `binding:"MaxSize(50)"`
- Location string `binding:"MaxSize(50)"`
- Active bool
- Admin bool
- AllowGitHook bool
+ LoginType string `binding:"Required"`
+ LoginName string
+ FullName string `binding:"MaxSize(100)"`
+ Email string `binding:"Required;Email;MaxSize(254)"`
+ Password string `binding:"MaxSize(255)"`
+ Website string `binding:"MaxSize(50)"`
+ Location string `binding:"MaxSize(50)"`
+ Active bool
+ Admin bool
+ AllowGitHook bool
+ AllowImportLocal bool
}
func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {