1
0
Fork 0
forked from forgejo/forgejo

Allow adding SSH keys even if SSH server is disabled (#24025)

This is useful in case you want to use them for signature verification.

A notice is added to avoid confusion.
This commit is contained in:
Dmitry Sharshakov 2023-04-10 20:22:51 +03:00 committed by GitHub
parent d7552c27d3
commit eb397c3e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 12 deletions

View file

@ -1,13 +1,9 @@
<h4 class="ui top attached header">
{{.locale.Tr "settings.manage_ssh_keys"}}
<div class="ui right">
{{if not .DisableSSH}}
<button id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
{{.locale.Tr "settings.add_key"}}
</button>
{{else}}
<button class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</button>
{{end}}
<button id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
{{.locale.Tr "settings.add_key"}}
</button>
</div>
</h4>
<div class="ui attached segment">
@ -35,6 +31,11 @@
<div class="item">
{{.locale.Tr "settings.ssh_desc"}}
</div>
{{if .DisableSSH}}
<div class="item">
{{.locale.Tr "settings.ssh_signonly"}}
</div>
{{end}}
{{range $index, $key := .Keys}}
<div class="item">
<div class="right floated content">