|
179 | 179 | end
|
180 | 180 | get 'search/', to: 'search#results'
|
181 | 181 |
|
182 |
| - scope 'admin' do |
183 |
| - get '/stats', to: 'admin#dashboard', as: :admin_dashboard |
184 |
| - get '/content_type/:type', to: 'admin#content_type', as: :admin_content_type |
185 |
| - get '/attributes', to: 'admin#attributes', as: :admin_attributes |
186 |
| - get '/masquerade/:user_id', to: 'admin#masquerade', as: :masquerade |
187 |
| - get '/unsubscribe', to: 'admin#unsubscribe', as: :mass_unsubscribe |
188 |
| - post '/perform_unsubscribe', to: 'admin#perform_unsubscribe', as: :perform_unsubscribe |
| 182 | + authenticate :user, lambda { |u| u.site_administrator? } do |
| 183 | + scope 'admin' do |
| 184 | + get '/stats', to: 'admin#dashboard', as: :admin_dashboard |
| 185 | + get '/content_type/:type', to: 'admin#content_type', as: :admin_content_type |
| 186 | + get '/attributes', to: 'admin#attributes', as: :admin_attributes |
| 187 | + get '/masquerade/:user_id', to: 'admin#masquerade', as: :masquerade |
| 188 | + get '/unsubscribe', to: 'admin#unsubscribe', as: :mass_unsubscribe |
| 189 | + post '/perform_unsubscribe', to: 'admin#perform_unsubscribe', as: :perform_unsubscribe |
| 190 | + end |
| 191 | + mount RailsAdmin::Engine => '/admin', as: 'rails_admin' |
189 | 192 | end
|
190 |
| - mount RailsAdmin::Engine => '/admin', as: 'rails_admin' |
191 | 193 |
|
192 | 194 | scope 'export' do
|
193 | 195 | get '/', to: 'export#index', as: :notebook_export
|
|
267 | 269 | # get '/forum/:wildcard/:another', to: 'emergency#temporarily_disabled'
|
268 | 270 | mount Thredded::Engine => '/forum'
|
269 | 271 | mount StripeEvent::Engine, at: '/webhooks/stripe'
|
| 272 | + |
| 273 | + require 'sidekiq/web' |
| 274 | + authenticate :user, lambda { |u| u.site_administrator? } do |
| 275 | + mount Sidekiq::Web => '/sidekiq' |
| 276 | + end |
270 | 277 | end
|
271 | 278 |
|
272 | 279 | # rubocop:enable LineLength
|
0 commit comments