Sidekiq route behind superadmin authentication

This commit is contained in:
Mathieu Magnin 2017-03-15 14:40:37 +01:00
parent 24d17dc0f3
commit 700372231d

View file

@ -42,9 +42,13 @@ Rails.application.routes.draw do
get 'admin' => 'admin#index'
get 'backoffice' => 'backoffice#index'
resources :administrations, only: [:index, :create]
namespace :administrations do
resources :stats, only: [:index]
authenticate :administration do
resources :administrations, only: [:index, :create]
namespace :administrations do
resources :stats, only: [:index]
mount Sidekiq::Web => '/sidekiq'
end
end
namespace :france_connect do
@ -209,7 +213,6 @@ Rails.application.routes.draw do
require 'sidekiq/web'
require 'sidekiq/cron/web'
mount Sidekiq::Web => '/sidekiq' # , constraints: lambda { |request| User::is_admin_from_request(request) }
apipie
end