-
Notifications
You must be signed in to change notification settings - Fork 69
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
Why has_permission decorator is being deprecated ? #338
Comments
See #169 TL;DR (though it's a short thread): There is little difference between @has_permission("read")
async def handler(request):
(your code) And async def handler(request):
await check_permission(request, "read")
(your code) And both do exactly the same thing in the app - raise HTTPForbidden if user is unauthorized No idea why it wasn't documented anywhere though, since that thread even mentions explaining the reasoning in documentation. |
Checking on the code, the decorator
has_permission
option is being deprecated in favor ofcheck_permission
which has no decorator option. Why?My best guess is is that it should not be the responsibility of the package to implement such feature, but I could not find the documented reason.
The text was updated successfully, but these errors were encountered: