-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Extract out check_permissions()
from `BaseView
#1675
Comments
check_permissions()
from `BaseViewcheck_permissions()
from `BaseView
A slightly odd thing about these methods is that they either fail silently or they raise a Maybe they should instead return |
Though at that point So maybe
|
The other difference though is that |
One benefit of the current design of I could return an object which evaluates to |
Idea: A new |
Also calling that function |
Updated documentation: https://github.com/simonw/datasette/blob/e627510b760198ccedba9e5af47a771e847785c9/docs/internals.rst#await-ensure_permissionsactor-permissions
That's pretty hard to understand! I'm going to open a separate issue to reconsider if this is a useful enough abstraction given how confusing it is. |
datasette/datasette/views/base.py
Lines 69 to 103 in 4a4164b
Originally posted by @simonw in #1660 (comment)
The text was updated successfully, but these errors were encountered: