aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorVlad Temian <vladtemian@gmail.com>2018-01-07 00:55:53 +0200
committerLauris BH <lauris@nix.lv>2018-01-07 00:55:53 +0200
commite78786ef39526fac6705a831fc291c55f1ca091b (patch)
treec529a79c1460facdf30f04b860cee234d64c229c /modules
parent70b6c07590f9014876073e2d69a6278e94db582f (diff)
downloadgitea-e78786ef39526fac6705a831fc291c55f1ca091b.tar.gz
gitea-e78786ef39526fac6705a831fc291c55f1ca091b.zip
Writable deploy keys (closes #671) (#3225)
* Add is_writable checkbox to deploy keys interface * Add writable key option to deploy key form * Add support for writable ssh keys in the interface * Rename IsWritable to ReadOnly * Test: create read-only and read-write deploy keys via api * Add DeployKey access mode migration * Update gitea sdk via govendor * Fix deploykey migration * Add unittests for writable deploy keys * Move template text to locale * Remove implicit column update * Remove duplicate locales * Replace ReadOnly field with IsReadOnly method * Fix deploy_keys related integration test * Rename v54 migration with v55 * Fix migration hell
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/user_form.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go
index ab0bb1e7dd..d913822a8d 100644
--- a/modules/auth/user_form.go
+++ b/modules/auth/user_form.go
@@ -169,9 +169,10 @@ func (f *AddOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) bind
// AddKeyForm form for adding SSH/GPG key
type AddKeyForm struct {
- Type string `binding:"OmitEmpty"`
- Title string `binding:"Required;MaxSize(50)"`
- Content string `binding:"Required"`
+ Type string `binding:"OmitEmpty"`
+ Title string `binding:"Required;MaxSize(50)"`
+ Content string `binding:"Required"`
+ IsWritable bool
}
// Validate validates the fields