diff --git a/routers/web/web.go b/routers/web/web.go
index 6aee3dbeda72..5116440b5749 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -479,7 +479,7 @@ func RegisterRoutes(m *web.Route) {
m.Get("", user_setting.Secrets)
m.Post("", web.Bind(forms.AddSecretForm{}), user_setting.SecretsPost)
m.Post("/delete", user_setting.SecretsDelete)
- })
+ }, actions.MustEnableActions)
m.Get("/organization", user_setting.Organization)
m.Get("/repos", user_setting.Repos)
m.Post("/repos/unadopted", user_setting.AdoptOrDeleteRepository)
@@ -853,7 +853,7 @@ func RegisterRoutes(m *web.Route) {
m.Get("", org.Secrets)
m.Post("", web.Bind(forms.AddSecretForm{}), org.SecretsPost)
m.Post("/delete", org.SecretsDelete)
- })
+ }, actions.MustEnableActions)
m.Route("/delete", "GET,POST", org.SettingsDelete)
@@ -1044,7 +1044,7 @@ func RegisterRoutes(m *web.Route) {
m.Get("", repo.Secrets)
m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
m.Post("/delete", repo.DeleteSecret)
- })
+ }, actions.MustEnableActions)
m.Group("/lfs", func() {
m.Get("/", repo.LFSFiles)
diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl
index 7380deff779b..f7fe5ed21633 100644
--- a/templates/org/settings/navbar.tmpl
+++ b/templates/org/settings/navbar.tmpl
@@ -12,9 +12,11 @@
{{.locale.Tr "repo.labels"}}
+ {{if .EnableActions}}
{{.locale.Tr "secrets.secrets"}}
+ {{end}}
{{if .EnableOAuth2}}
{{.locale.Tr "settings.applications"}}
diff --git a/templates/repo/settings/nav.tmpl b/templates/repo/settings/nav.tmpl
index 3156d9b159fc..ea2e373c3fe7 100644
--- a/templates/repo/settings/nav.tmpl
+++ b/templates/repo/settings/nav.tmpl
@@ -13,7 +13,9 @@
{{.locale.Tr "repo.settings.githooks"}}
{{end}}
{{.locale.Tr "repo.settings.deploy_keys"}}
+ {{if .EnableActions}}
{{.locale.Tr "secrets.secrets"}}
+ {{end}}
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl
index bdfbb6bf109c..92377897e95e 100644
--- a/templates/repo/settings/navbar.tmpl
+++ b/templates/repo/settings/navbar.tmpl
@@ -27,9 +27,11 @@
{{.locale.Tr "repo.settings.deploy_keys"}}
+ {{if .EnableActions}}
{{.locale.Tr "secrets.secrets"}}
+ {{end}}
{{if .LFSStartServer}}
{{.locale.Tr "repo.settings.lfs"}}
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl
index 8deffde0b224..4b9006340728 100644
--- a/templates/user/settings/navbar.tmpl
+++ b/templates/user/settings/navbar.tmpl
@@ -18,9 +18,11 @@
{{.locale.Tr "settings.ssh_gpg_keys"}}
+ {{if .EnableActions}}
{{.locale.Tr "secrets.secrets"}}
+ {{end}}
{{if .EnablePackages}}
{{.locale.Tr "packages.title"}}