Take the 2-minute tour ×

I'm using ActiveAdmin on Rails which is excellent.

However, 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 }

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Have you tried cancan: https://github.com/ryanb/cancan? There a gist with perfect example: https://gist.github.com/1264060

share|improve this answer
What if we want to avoid cancan? I'm struggling to find a way to register a before_filter on a resource so that I can just check that the current_user.administrator? Cancan seems overkill in this instance. –  Brendon Muir Oct 2 '12 at 22:26
add comment

Your Answer


