|
|
@ -417,7 +417,7 @@ func registerRoutes(m *web.Route) { |
|
|
|
m.Post("/packagist/{id}", web.Bind(forms.NewPackagistHookForm{}), repo_setting.PackagistHooksEditPost) |
|
|
|
m.Post("/packagist/{id}", web.Bind(forms.NewPackagistHookForm{}), repo_setting.PackagistHooksEditPost) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
addSettingVariablesRoutes := func() { |
|
|
|
addSettingsVariablesRoutes := func() { |
|
|
|
m.Group("/variables", func() { |
|
|
|
m.Group("/variables", func() { |
|
|
|
m.Get("", repo_setting.Variables) |
|
|
|
m.Get("", repo_setting.Variables) |
|
|
|
m.Post("/new", web.Bind(forms.EditVariableForm{}), repo_setting.VariableCreate) |
|
|
|
m.Post("/new", web.Bind(forms.EditVariableForm{}), repo_setting.VariableCreate) |
|
|
@ -618,7 +618,7 @@ func registerRoutes(m *web.Route) { |
|
|
|
m.Get("", user_setting.RedirectToDefaultSetting) |
|
|
|
m.Get("", user_setting.RedirectToDefaultSetting) |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingVariablesRoutes() |
|
|
|
addSettingsVariablesRoutes() |
|
|
|
}, actions.MustEnableActions) |
|
|
|
}, actions.MustEnableActions) |
|
|
|
|
|
|
|
|
|
|
|
m.Get("/organization", user_setting.Organization) |
|
|
|
m.Get("/organization", user_setting.Organization) |
|
|
@ -763,6 +763,7 @@ func registerRoutes(m *web.Route) { |
|
|
|
m.Group("/actions", func() { |
|
|
|
m.Group("/actions", func() { |
|
|
|
m.Get("", admin.RedirectToDefaultSetting) |
|
|
|
m.Get("", admin.RedirectToDefaultSetting) |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
|
|
|
|
addSettingsVariablesRoutes() |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, adminReq, ctxDataSet("EnableOAuth2", setting.OAuth2.Enable, "EnablePackages", setting.Packages.Enabled)) |
|
|
|
}, adminReq, ctxDataSet("EnableOAuth2", setting.OAuth2.Enable, "EnablePackages", setting.Packages.Enabled)) |
|
|
|
// ***** END: Admin *****
|
|
|
|
// ***** END: Admin *****
|
|
|
@ -905,7 +906,7 @@ func registerRoutes(m *web.Route) { |
|
|
|
m.Get("", org_setting.RedirectToDefaultSetting) |
|
|
|
m.Get("", org_setting.RedirectToDefaultSetting) |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingVariablesRoutes() |
|
|
|
addSettingsVariablesRoutes() |
|
|
|
}, actions.MustEnableActions) |
|
|
|
}, actions.MustEnableActions) |
|
|
|
|
|
|
|
|
|
|
|
m.Methods("GET,POST", "/delete", org.SettingsDelete) |
|
|
|
m.Methods("GET,POST", "/delete", org.SettingsDelete) |
|
|
@ -1084,7 +1085,7 @@ func registerRoutes(m *web.Route) { |
|
|
|
m.Get("", repo_setting.RedirectToDefaultSetting) |
|
|
|
m.Get("", repo_setting.RedirectToDefaultSetting) |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsRunnersRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingsSecretsRoutes() |
|
|
|
addSettingVariablesRoutes() |
|
|
|
addSettingsVariablesRoutes() |
|
|
|
}, actions.MustEnableActions) |
|
|
|
}, actions.MustEnableActions) |
|
|
|
// the follow handler must be under "settings", otherwise this incomplete repo can't be accessed
|
|
|
|
// the follow handler must be under "settings", otherwise this incomplete repo can't be accessed
|
|
|
|
m.Group("/migrate", func() { |
|
|
|
m.Group("/migrate", func() { |
|
|
|