From e78786ef39526fac6705a831fc291c55f1ca091b Mon Sep 17 00:00:00 2001 From: Vlad Temian Date: Sun, 7 Jan 2018 00:55:53 +0200 Subject: 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 --- vendor/code.gitea.io/sdk/gitea/repo_key.go | 4 ++++ vendor/vendor.json | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'vendor') diff --git a/vendor/code.gitea.io/sdk/gitea/repo_key.go b/vendor/code.gitea.io/sdk/gitea/repo_key.go index 03f626cd6e..f2f1038aa3 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo_key.go +++ b/vendor/code.gitea.io/sdk/gitea/repo_key.go @@ -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 diff --git a/vendor/vendor.json b/vendor/vendor.json index 893110ac71..828bdd4e43 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -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=", -- cgit v1.2.3