I’m using ActiveAdmin on Rails and I’m trying to lock down the section of the site which maintains admin users to non superusers.
Naturally I can hide the menu option like this:
ActiveAdmin.register AdminUser do
menu :parent => "Settings", :if => proc { current_admin_user.superuser }
end
However the route still works if you bypass the menu and go directly to /admin/admin_users
What is the best practice to lock down the routes and controller for admins in ActiveAdmin.
Have you tried cancan: https://github.com/ryanb/cancan? There a gist with perfect example: https://gist.github.com/1264060