mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-06-11 03:10:02 -04:00
Exclude SSH principals from .keys route
This commit is contained in:
parent
6a5dda7116
commit
cfcbc33af0
1 changed files with 3 additions and 0 deletions
|
|
@ -705,6 +705,9 @@ func ShowSSHKeys(ctx *context.Context) {
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
for i := range keys {
|
for i := range keys {
|
||||||
|
if keys[i].Type == asymkey_model.KeyTypePrincipal {
|
||||||
|
continue // Don't display SSH principals, only public keys
|
||||||
|
}
|
||||||
buf.WriteString(keys[i].OmitEmail())
|
buf.WriteString(keys[i].OmitEmail())
|
||||||
buf.WriteString("\n")
|
buf.WriteString("\n")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue