-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
Ability to customize what happens when a view permission fails #812
Comments
I'm going to figure this out by working with simonw/datasette-auth-github#62 |
This can be a plugin hook: @hookspec
def forbidden(datasette, request, message, send):
"Custom response for a 403 forbidden error" If the hook returns a Maybe the hook can instead use the I'm going to leave |
This case may not be covered without extra work: datasette/datasette/views/database.py Lines 122 to 123 in 3ec5b1a
|
Currently view permission failures raise a
Forbidden
error which is transformed into a 403.It would be good if this page could offer a way forward - maybe just by linking to (or redirecting to) a login screen. This behaviour will vary based on authentication plugins, so a new plugin hook is probably the best way to do this.
The text was updated successfully, but these errors were encountered: