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
This commit is contained in:
Vlad Temian 2018-01-07 00:55:53 +02:00 committed by Lauris BH
parent 70b6c07590
commit e78786ef39
13 changed files with 184 additions and 13 deletions

View file

@ -46,6 +46,10 @@ type CreateKeyOption struct {
// required: true
// unique: true
Key string `json:"key" binding:"Required"`
// Describe if the key has only read access or read/write
//
// required: false
ReadOnly bool `json:"read_only"`
}
// CreateDeployKey options when create one deploy key

6
vendor/vendor.json vendored
View file

@ -9,10 +9,10 @@
"revisionTime": "2017-12-22T02:43:26Z"
},
{
"checksumSHA1": "QQ7g7B9+EIzGjO14KCGEs9TNEzM=",
"checksumSHA1": "Qtq0kW+BnpYMOriaoCjMa86WGG8=",
"path": "code.gitea.io/sdk/gitea",
"revision": "ec7d3af43b598c1a3f2cb12f633b9625649d8e54",
"revisionTime": "2017-11-28T12:30:39Z"
"revision": "79eee8f12c7fc1cc5b802c5cdc5b494ef3733866",
"revisionTime": "2017-12-20T06:57:50Z"
},
{
"checksumSHA1": "bOODD4Gbw3GfcuQPU2dI40crxxk=",