Class: SystemHook

Inherits:
WebHook show all
Includes:
TriggerableHooks
Defined in:
app/models/hooks/system_hook.rb

Constant Summary

Constants included from TriggerableHooks

TriggerableHooks::AVAILABLE_TRIGGERS

Instance Method Summary collapse

Methods inherited from WebHook

#async_execute, #execute

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, where_exists, with_fast_statement_timeout, without_order

Instance Method Details

#allow_local_requests?Boolean

Allow urls pointing localhost and the local network

Returns:

  • (Boolean)

20
21
22
# File 'app/models/hooks/system_hook.rb', line 20

def allow_local_requests?
  Gitlab::CurrentSettings.allow_local_requests_from_system_hooks?
end

#help_pathObject


28
29
30
# File 'app/models/hooks/system_hook.rb', line 28

def help_path
  'system_hooks/system_hooks'
end

#pluralized_nameObject


24
25
26
# File 'app/models/hooks/system_hook.rb', line 24

def pluralized_name
  _('System Hooks')
end