1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Wrap engine mounting in authentication to prevent direct access.

This commit is contained in:
Claude Ayitey 2024-01-06 15:01:22 +00:00
parent 29a346ee08
commit 4ad1faacc8

View file

@ -1,8 +1,9 @@
require 'sidekiq/web'
Rails.application.routes.draw do
mount GoodJob::Engine => "/good_job"
# end
# authenticate user before showing GoodJob dashboard
authenticate :user, ->(user) { user.admin? } do
mount GoodJob::Engine => "/good_job"
end
# Routes for accounts
resources :accounts do