Commit 0fcfb496 authored by Per Lundberg's avatar Per Lundberg

Fix 'private method 'load' called' when posting non-whitelisted webhook

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/221294

Changelog: fixed
parent fff0d177
......@@ -8,7 +8,7 @@ class Admin::HooksController < Admin::ApplicationController
feature_category :integrations
def index
@hooks = SystemHook.all
@hooks = SystemHook.all.load
@hook = SystemHook.new
end
......
......@@ -15,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController
feature_category :integrations
def index
@hooks = @project.hooks
@hooks = @project.hooks.load
@hook = ProjectHook.new
end
......
......@@ -3,7 +3,7 @@
.card-header
%h5
= hook_class.underscore.humanize.titleize.pluralize
(#{hooks.load.size})
(#{hooks.size})
- if hooks.any?
%ul.content-list
......
......@@ -17,7 +17,7 @@ class Groups::HooksController < Groups::ApplicationController
feature_category :integrations
def index
@hooks = @group.hooks
@hooks = @group.hooks.load
@hook = GroupHook.new
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment