aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/settings
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 /templates/repo/settings
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 'templates/repo/settings')
-rw-r--r--templates/repo/settings/deploy_keys.tmpl11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl
index 3b22be532b..f19055f2b5 100644
--- a/templates/repo/settings/deploy_keys.tmpl
+++ b/templates/repo/settings/deploy_keys.tmpl
@@ -31,7 +31,7 @@
{{.Fingerprint}}
</div>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} - <span>{{$.i18n.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.i18n.Tr "settings.can_write_info"}} {{end}}</i>
</div>
</div>
</div>
@@ -60,6 +60,15 @@
<label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
</div>
+ <div class="field">
+ <div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
+ <input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1">
+ <label for="is_writable">
+ {{.i18n.Tr "repo.settings.is_writable"}}
+ </label>
+ <small style="padding-left: 26px;">{{$.i18n.Tr "repo.settings.is_writable_info" | Str2html}}</small>
+ </div>
+ </div>
<button class="ui green button">
{{.i18n.Tr "repo.settings.add_deploy_key"}}
</button>