diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2017-12-04 12:51:39 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-01-17 09:55:00 +0100 |
commit | a78abf3a0071d1705adc562f23be1f3a347c6db5 (patch) | |
tree | 553bac3b43e07507aabe3d833b988015e8749f85 /app/services/system_hooks_service.rb | |
parent | ac92d70d9025e1c90bffa99c08bfc4cdb2fc36c9 (diff) | |
download | gitlab-ce-a78abf3a0071d1705adc562f23be1f3a347c6db5.tar.gz |
use safer .hooks_for instead of .public_send
with .public_send we can't make sure that the scope on the model
actually exists.
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r-- | app/services/system_hooks_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb index 690918b4a00..68c4597a133 100644 --- a/app/services/system_hooks_service.rb +++ b/app/services/system_hooks_service.rb @@ -8,7 +8,7 @@ class SystemHooksService end def execute_hooks(data, hooks_scope = :all) - SystemHook.public_send(hooks_scope).find_each do |hook| # rubocop:disable GitlabSecurity/PublicSend + SystemHook.hooks_for(hooks_scope).find_each do |hook| hook.async_execute(data, 'system_hooks') end end |