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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.