diff options
author | Unknwon <u@gogs.io> | 2017-02-21 20:21:25 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-21 20:21:25 -0500 |
commit | 60aca9ea18f4fed6c98c83d41036f9a34fdbd28c (patch) | |
tree | 5fbf8009c9997678e4d9dedde80d98fd1e489cc8 /routers/org/setting.go | |
parent | 6a8ad0b3574c3ab1f3a441493dc002b805b45a38 (diff) |
webhook: also only enable certain types (#3356)
Add new config option '[webhook] TYPES’.
Diffstat (limited to 'routers/org/setting.go')
-rw-r--r-- | routers/org/setting.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/org/setting.go b/routers/org/setting.go index 1cd9fc16..4949c3a0 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -18,9 +18,9 @@ import ( ) const ( - SETTINGS_OPTIONS base.TplName = "org/settings/options" - SETTINGS_DELETE base.TplName = "org/settings/delete" - SETTINGS_HOOKS base.TplName = "org/settings/hooks" + SETTINGS_OPTIONS base.TplName = "org/settings/options" + SETTINGS_DELETE base.TplName = "org/settings/delete" + SETTINGS_WEBHOOKS base.TplName = "org/settings/webhooks" ) func Settings(ctx *context.Context) { @@ -140,6 +140,7 @@ func Webhooks(ctx *context.Context) { ctx.Data["PageIsSettingsHooks"] = true ctx.Data["BaseLink"] = ctx.Org.OrgLink ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc") + ctx.Data["Types"] = setting.Webhook.Types ws, err := models.GetWebhooksByOrgID(ctx.Org.Organization.ID) if err != nil { @@ -148,7 +149,7 @@ func Webhooks(ctx *context.Context) { } ctx.Data["Webhooks"] = ws - ctx.HTML(200, SETTINGS_HOOKS) + ctx.HTML(200, SETTINGS_WEBHOOKS) } func DeleteWebhook(ctx *context.Context) { |