From e24bfbde1acbef73cd3c58753a572da2bcb59200 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Mar 2016 14:12:24 +0100 Subject: Fixing FanOutOnWriteService, fixing Sidekiq not having enough DB connections in the pool, adding a throttle of 60rpm per IP, adding mini profiler, adding admin status to users --- app/controllers/application_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d83690e1b..d5eaecdb1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,4 +2,11 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + # Profiling + before_action do + if current_user && current_user.admin? + Rack::MiniProfiler.authorize_request + end + end end -- cgit