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:
parent
29a346ee08
commit
4ad1faacc8
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue