Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-21 12:48:07 +0300
committerJames Lopez <james@jameslopez.es>2016-11-21 12:49:05 +0300
commit0fd397bba1a36136c3737165c9057bc59dcbca77 (patch)
tree5cfbefc6f918b96d5a1464c6c64f910661880c83 /app/controllers/projects/cycle_analytics_controller.rb
parent9aded5c8d43cf113b03e2d8fd04a32c4b24af24d (diff)
Added permissions per stage to cycle analytics endpoint
Diffstat (limited to 'app/controllers/projects/cycle_analytics_controller.rb')
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 96eb75a0547..8567b074f11 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -6,7 +6,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
before_action :authorize_read_cycle_analytics!
def show
- @cycle_analytics = ::CycleAnalytics.new(@project, from: start_date(cycle_analytics_params))
+ @cycle_analytics = ::CycleAnalytics.new(@project, from: start_date(cycle_analytics_params), user: current_user)
respond_to do |format|
format.html
@@ -54,7 +54,8 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
{
summary: summary,
- stats: stats
+ stats: stats,
+ permissions: @cycle_analytics.permissions
}
end
end