diff --git a/modules/templates/helper.go b/modules/templates/helper.go index fc07b49c71925..7c14bd49ed240 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -239,6 +239,9 @@ func NewFuncMap() []template.FuncMap { "DisableImportLocal": func() bool { return !setting.ImportLocalPaths }, + "DisableSSH": func() bool { + return setting.SSH.Disabled + }, "Dict": func(values ...interface{}) (map[string]interface{}, error) { if len(values)%2 != 0 { return nil, errors.New("invalid dict call") diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d8398f6d9fc5b..1a84efa864483 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -518,6 +518,7 @@ password = Password security = Security avatar = Avatar ssh_gpg_keys = SSH / GPG Keys +gpg_keys = GPG Keys social = Social Accounts applications = Applications orgs = Manage Organizations diff --git a/services/cron/tasks_extended.go b/services/cron/tasks_extended.go index ded819a71e917..0f53d0181f36e 100644 --- a/services/cron/tasks_extended.go +++ b/services/cron/tasks_extended.go @@ -158,8 +158,12 @@ func initExtendedTasks() { registerDeleteInactiveUsers() registerDeleteRepositoryArchives() registerGarbageCollectRepositories() - registerRewriteAllPublicKeys() - registerRewriteAllPrincipalKeys() + if !setting.SSH.Disabled && !setting.SSH.StartBuiltinServer && setting.SSH.CreateAuthorizedKeysFile { + registerRewriteAllPublicKeys() + } + if !setting.SSH.Disabled && !setting.SSH.StartBuiltinServer && setting.SSH.CreateAuthorizedPrincipalsFile { + registerRewriteAllPrincipalKeys() + } registerRepositoryUpdateHook() registerReinitMissingRepositories() registerDeleteMissingRepositories() diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 35f45bd3529c4..6fffff3176ef1 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -40,12 +40,14 @@