-
Notifications
You must be signed in to change notification settings - Fork 887
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
Enhancement: can ACLAuthorizationPolicy support __acl__ as a callable? #735
Labels
Comments
FTR I think the behavior your describe (any error in a property getter causing AttributeError) is actually a CPython bug, which may have been fixed in the latest version. |
I've merged this fix in aae62a0 and recommended its usage in the docs. Thanks for this solution. |
JocelynDelalande
added a commit
to JocelynDelalande/autonomie
that referenced
this issue
Nov 1, 2018
…acl__ Cela complexifiait le debug lorsque le code d'une ACL déclenchait une AttributeError car Pyramid ignorait cette dernière silencieusement. Je ne vois pas d'inconvénient à ce nouveau fonctionnement. Ref Pylons/pyramid#735 Ref CroissanceCommune/autonomie_base#2
sbodrero
pushed a commit
to sbodrero/autonomie
that referenced
this issue
Nov 10, 2018
…acl__ Cela complexifiait le debug lorsque le code d'une ACL déclenchait une AttributeError car Pyramid ignorait cette dernière silencieusement. Je ne vois pas d'inconvénient à ce nouveau fonctionnement. Ref Pylons/pyramid#735 Ref CroissanceCommune/autonomie_base#2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Being a python newb I did not know that any error in property getters result in an AttributeError. I understand the rationale behind it, but it makes me a little anxious to have my "security" code blowing up silently and leaving the traversal "layer" in an unexpected state.
What would be nice is if the ACLAuthorizationPolicy could look out for acl that is a callable and deal with it that way. then errors will bubble up properly.
For now, I've embraced and extended for batterii's innovation platform, but I'm of the opinion it might be desired in pyramid as well.
https://gist.github.com/4169503
The text was updated successfully, but these errors were encountered: