diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-11-12 06:48:50 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-11-12 06:48:50 -0500 |
commit | 8c9338a5377c60c84cdee1f5781b3de5933bb3b0 (patch) | |
tree | 57de36743bf8b9c8eaa0ff51172180b834354c4d /modules/auth/user_form.go | |
parent | 21b9d5fa1f4014b30619d221f5d665509d373147 (diff) | |
download | gitea-8c9338a5377c60c84cdee1f5781b3de5933bb3b0.tar.gz gitea-8c9338a5377c60c84cdee1f5781b3de5933bb3b0.zip |
add personal access token panel #12
Diffstat (limited to 'modules/auth/user_form.go')
-rw-r--r-- | modules/auth/user_form.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 72bdd4589f..6046a8d1ee 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -95,3 +95,20 @@ type ChangePasswordForm struct { func (f *ChangePasswordForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { return validate(errs, ctx.Data, f, ctx.Locale) } + +type AddSSHKeyForm struct { + SSHTitle string `form:"title" binding:"Required"` + Content string `form:"content" binding:"Required"` +} + +func (f *AddSSHKeyForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} + +type NewAccessTokenForm struct { + Name string `form:"name" binding:"Required"` +} + +func (f *NewAccessTokenForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} |