-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Allow passing a proc to authorize #291
Comments
I think accepting a Proc makes sense because it can be molded to fit just about any need. |
Sounds good, would you like me to do a PR? |
I'm not a maintainer, just a fellow contributor, but of course I'd love to see it. :) |
Oh lol :D Yea I'll wait to see what @palkan thinks :) |
Sounds good to me! Will be happy to review and merge a PR :) |
3 tasks
PR is up :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm flirting with
ActiveSupport::CurrentAttributes
and have to currently add a bridging method to passcurrent_user
into ActionPolicy:Would you be open to allowing a proc?
Of course I could just skip all that and use Current.user all over the policies. I'm not 100% sure how I feel about that yet.
Apart from the usual hate for
Current
is there any reason not to go this way? It would definitely make testing less isolated.The text was updated successfully, but these errors were encountered: