-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controllers filters added to BaseController instead of ResourceController #1683
Conversation
You need to update some tests so that they pass before we can merge this. See the Travis build failures. |
Sorry about that.. Done. |
Controllers filters added to BaseController instead of ResourceController
Awesome. Merged! |
👍 |
Just ran across this as well, same exact problem with checking if the user is an admin. Thanks for the fix. Should probably release this soon, big security hole here! |
You can use HEAD with: gem 'active_admin', :git => 'https://github.com/gregbell/active_admin.git' |
Already done. :) Just looking out for other people who aren't aware of the issue - glad I had a test for it. |
Is this PR up to date in 0.5.0 version? |
No, it came after 0.5.0. |
@jpmckinney could you help me? I have this route configuration and I'm not getting access "/admin" path. Always redirect to
And I don't know why. This patch solves my "issue" or I'm making some mess? Thanks in advance! |
I'm not sure. Can you create a new issue? Maybe the |
Thanks @jpmckinney! I created a new issue #1711. |
In my application, I'm using the before_filter to check if the user is an admin or not (same model for the all the users, but only admin can access the backend/activeadmin). The problem I had was that even non-admin users could access to the dashboard (only the dashboard, not the rest of the admin site) and that's because the before_filter was not applying to it.
So now, the before filter configured on the ActiveAdmin configuration is applied to the BaseController instead of only ResourceController.