Reputation: 3547
I have fnordmetrics mounted as a rack app in my rails routes.rb
file
In my Rails app, I have Devise handling authentication.
How can I restrict access to the fnordmetrics rack app to only AdminUsers
who have logged into the site?
Upvotes: 1
Views: 395
Reputation: 40277
You can normally restrict access to a route like this:
authenticated :user do
resource :profile
end
So, you can try
authenticated :admin_user do
mount #yadayadayada
end
Note: haven't tried, so ymmv, but I think this will work.
Upvotes: 3