From ad1164f73ba277f11a20ea838a62d9b8c8a7cb45 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 26 Dec 2020 04:24:47 +0000 Subject: Disable SSH key deletion of externally managed Keys (#13985) * Disable SSH key addition and deletion when externally managed When a user has a login source which has SSH key management key addition and deletion using the UI should be disabled. Fix #13983 Signed-off-by: Andrew Thornton * Make only externally managed keys disabled Signed-off-by: Andrew Thornton Co-authored-by: Lunny Xiao --- templates/user/settings/keys_ssh.tmpl | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'templates/user/settings') diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 9a4db09c2d..95e95b0ddb 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -1,7 +1,7 @@

{{.i18n.Tr "settings.manage_ssh_keys"}}
- {{if not .DisableSSH}} + {{if not .DisableSSH }}
{{.i18n.Tr "settings.add_key"}}
{{else}}
{{.i18n.Tr "settings.ssh_disabled"}}
@@ -13,25 +13,25 @@
{{.i18n.Tr "settings.ssh_desc"}}
- {{range .Keys}} + {{range $index, $key := .Keys}}
-
- -
-
- {{svg "octicon-key" 32}} -
-
- {{.Name}} -
- {{.Fingerprint}} -
-
- {{$.i18n.Tr "settings.add_on"}} {{.CreatedUnix.FormatShort}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{.UpdatedUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} -
-
+
+ +
+
+ {{svg "octicon-key" 32}} +
+
+ {{.Name}} +
+ {{.Fingerprint}} +
+
+ {{$.i18n.Tr "settings.add_on"}} {{.CreatedUnix.FormatShort}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{.UpdatedUnix.FormatShort}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}} +
+
{{end}}
-- cgit v1.2.3