diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2017-12-18 11:14:51 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-01-17 09:55:00 +0100 |
commit | 337ced28bcdff25a2d2d4c726d37c782c4cc2d24 (patch) | |
tree | 21dc95292df2efc63d1a8b4ff2aa53578a966390 /app/controllers | |
parent | eb5e0e921c017322ad8f9122d897b0cf39c0b294 (diff) | |
download | gitlab-ce-337ced28bcdff25a2d2d4c726d37c782c4cc2d24.tar.gz |
reference triggers.values for permitted parameters
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/hooks_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/projects/hooks_controller.rb | 10 |
2 files changed, 3 insertions, 14 deletions
diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb index 1c90c298f66..2b47819303e 100644 --- a/app/controllers/admin/hooks_controller.rb +++ b/app/controllers/admin/hooks_controller.rb @@ -59,12 +59,9 @@ class Admin::HooksController < Admin::ApplicationController def hook_params params.require(:hook).permit( :enable_ssl_verification, - :push_events, - :tag_push_events, - :repository_update_events, - :merge_requests_events, :token, - :url + :url, + *SystemHook.triggers.values ) end end diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 85d35900c71..b83d6543096 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -63,18 +63,10 @@ class Projects::HooksController < Projects::ApplicationController def hook_params params.require(:hook).permit( - :job_events, - :pipeline_events, :enable_ssl_verification, - :issues_events, - :confidential_issues_events, - :merge_requests_events, - :note_events, - :push_events, - :tag_push_events, :token, :url, - :wiki_page_events + *ProjectHook.triggers.values ) end end |