-
Notifications
You must be signed in to change notification settings - Fork 270
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
Use with Pundit #187
Comments
Hi, So that's why you can't just easy plug and play two_factor_authentication with AA. Could you please give me project example? I could check it |
The application is proprietary, and already in production, so I can't share it, and it would be hard to remove enough to make it sharable. It just seems like there should be a place in the Pundit gem where I can "see" what the policy name is that the library is trying to find, so that I can write it and place it in the code tree correctly. My best guess so far has been:
|
No, I mean you could make separate empty application just with active admin and pundit. And share that new app. |
I've "taken the training wheels off" my Pundit setup by adding
after_action :verify_authorized
to my ApplicationPolicy (which blocks every path not explicitly allowed by policy). I'm using Devise with the two_factor_authentication plugin, and ActiveAdmin. So Devise authentications have now been "absorbed" into the/admin
namespace, and the 2-factor controller lives somewhere in the mix. This has been working fine until I forced explicit definitions of policy. Now, when the app tries to serve the page to allow a user to enter the OTP, I get the following error:I don't know what path/module/namespace/controller/model I'm supposed to be defining to allow this action for all users. How can I cover this path with a Pundit policy? I've tried creating just about every combination of file name, directory path (under
/app/policies
), and namespace inside the file, but nothing I try even gives me a different error message. Does anyone know the right way to handle this? I can't find a single example on the internet.The text was updated successfully, but these errors were encountered: