diff options
author | James Lopez <james@jameslopez.es> | 2016-11-15 17:22:35 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 10:22:58 +0300 |
commit | ca6da6ea3034a58c0edbc62336d2d49ea6e11fc9 (patch) | |
tree | 91e9bb0520f6310b210e26b70d88fc779fdbe4c7 /app/controllers | |
parent | 73e9ec631995d5ed91a3eb5e8416c924e7d7c5ad (diff) |
Renamed pipeline column and fixed permissions for builds in events controller
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/cycle_analytics/events_controller.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/projects/cycle_analytics/events_controller.rb b/app/controllers/projects/cycle_analytics/events_controller.rb index 77b49d6c4b9..cc75dc247d3 100644 --- a/app/controllers/projects/cycle_analytics/events_controller.rb +++ b/app/controllers/projects/cycle_analytics/events_controller.rb @@ -2,6 +2,7 @@ class Projects::CycleAnalytics::EventsController < Projects::ApplicationControll include CycleAnalyticsParams before_action :authorize_read_cycle_analytics! + before_action :authorize_read_builds!, only: [:test, :staging] def issue render_events(events.issue_events) @@ -16,7 +17,7 @@ class Projects::CycleAnalytics::EventsController < Projects::ApplicationControll end def test - @opts = { from: start_date(events_params), branch: events_params[:branch_name] } + @options = { from: start_date(events_params), branch: events_params[:branch_name] } render_events(events.test_events) end @@ -47,12 +48,12 @@ class Projects::CycleAnalytics::EventsController < Projects::ApplicationControll end def options - @opts ||= { from: start_date(events_params) } + @options ||= { from: start_date(events_params) } end def events_params return {} unless params[:events].present? - { start_date: params[:events][:start_date], branch_name: params[:events][:branch_name] } + params[:events].slice(:start_date, :branch_name) end end |