{"html_url": "https://github.com/simonw/datasette/issues/812#issuecomment-652165709", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/812", "id": 652165709, "node_id": "MDEyOklzc3VlQ29tbWVudDY1MjE2NTcwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-07-01T03:26:35Z", "updated_at": "2020-07-01T03:26:35Z", "author_association": "OWNER", "body": "This case may not be covered without extra work:\r\nhttps://github.com/simonw/datasette/blob/3ec5b1abf6afa2d22a3378092809a1a8c0249d26/datasette/views/database.py#L122-L123", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 634112607, "label": "Ability to customize what happens when a view permission fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/812#issuecomment-652163450", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/812", "id": 652163450, "node_id": "MDEyOklzc3VlQ29tbWVudDY1MjE2MzQ1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-07-01T03:18:51Z", "updated_at": "2020-07-01T03:20:28Z", "author_association": "OWNER", "body": "This can be a plugin hook:\r\n\r\n```python\r\n@hookspec\r\ndef forbidden(datasette, request, message, send):\r\n \"Custom response for a 403 forbidden error\"\r\n```\r\nIf the hook returns a `Response` object, it will be returned to the user. Plugins are likely to want to return a redirect response.\r\n\r\nMaybe the hook can instead use the `send` argument to respond to the request and return `True` which means \"I've responded to this\"?\r\n\r\nI'm going to leave `send` off for the moment - I can add that in the future if it turns out it would have been a good idea.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 634112607, "label": "Ability to customize what happens when a view permission fails"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/812#issuecomment-641353729", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/812", "id": 641353729, "node_id": "MDEyOklzc3VlQ29tbWVudDY0MTM1MzcyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-06-09T14:59:25Z", "updated_at": "2020-06-09T14:59:25Z", "author_association": "OWNER", "body": "I'm going to figure this out by working with https://github.com/simonw/datasette-auth-github/issues/62", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 634112607, "label": "Ability to customize what happens when a view permission fails"}, "performed_via_github_app": null}