aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorJean-Baptiste Gomond <dev@jbgomond.com>2023-12-25 08:28:59 +0100
committerGitHub <noreply@github.com>2023-12-25 07:28:59 +0000
commitd0f24ff4cad05c1145afeca791e7d02fe146d46a (patch)
treee1da84ade8f14914c7b37c3d29bc917a3cfb7c63 /routers/web/web.go
parent0407a402bb29a3643e2b4a8992f1d7687a88b40c (diff)
downloadgitea-d0f24ff4cad05c1145afeca791e7d02fe146d46a.tar.gz
gitea-d0f24ff4cad05c1145afeca791e7d02fe146d46a.zip
Added instance-level variables (#28115)
This PR adds instance-level variables, and so closes #27726 ![gitea_instance_variables_1](https://github.com/go-gitea/gitea/assets/8344487/ad409cd4-ce36-4c84-a764-34451b0fb63a) ![gitea_instance_variables_2](https://github.com/go-gitea/gitea/assets/8344487/426f0965-dec6-4560-948c-067cdeddd720) ![gitea_instance_variables_3](https://github.com/go-gitea/gitea/assets/8344487/cf1d7776-4938-4825-922e-cbbbf28a5f33)
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 359b608c71..02fb11b1f5 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -417,7 +417,7 @@ func registerRoutes(m *web.Route) {
m.Post("/packagist/{id}", web.Bind(forms.NewPackagistHookForm{}), repo_setting.PackagistHooksEditPost)
}
- addSettingVariablesRoutes := func() {
+ addSettingsVariablesRoutes := func() {
m.Group("/variables", func() {
m.Get("", repo_setting.Variables)
m.Post("/new", web.Bind(forms.EditVariableForm{}), repo_setting.VariableCreate)
@@ -618,7 +618,7 @@ func registerRoutes(m *web.Route) {
m.Get("", user_setting.RedirectToDefaultSetting)
addSettingsRunnersRoutes()
addSettingsSecretsRoutes()
- addSettingVariablesRoutes()
+ addSettingsVariablesRoutes()
}, actions.MustEnableActions)
m.Get("/organization", user_setting.Organization)
@@ -763,6 +763,7 @@ func registerRoutes(m *web.Route) {
m.Group("/actions", func() {
m.Get("", admin.RedirectToDefaultSetting)
addSettingsRunnersRoutes()
+ addSettingsVariablesRoutes()
})
}, adminReq, ctxDataSet("EnableOAuth2", setting.OAuth2.Enable, "EnablePackages", setting.Packages.Enabled))
// ***** END: Admin *****
@@ -905,7 +906,7 @@ func registerRoutes(m *web.Route) {
m.Get("", org_setting.RedirectToDefaultSetting)
addSettingsRunnersRoutes()
addSettingsSecretsRoutes()
- addSettingVariablesRoutes()
+ addSettingsVariablesRoutes()
}, actions.MustEnableActions)
m.Methods("GET,POST", "/delete", org.SettingsDelete)
@@ -1084,7 +1085,7 @@ func registerRoutes(m *web.Route) {
m.Get("", repo_setting.RedirectToDefaultSetting)
addSettingsRunnersRoutes()
addSettingsSecretsRoutes()
- addSettingVariablesRoutes()
+ addSettingsVariablesRoutes()
}, actions.MustEnableActions)
// the follow handler must be under "settings", otherwise this incomplete repo can't be accessed
m.Group("/migrate", func() {