{"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1697725150", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1697725150, "node_id": "IC_kwDOBm6k_c5lMTre", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-29T15:54:12Z", "updated_at": "2023-08-29T15:54:12Z", "author_association": "OWNER", "body": "In that last commit I also upgraded `Permission` from a named tuple to a dataclass, and added a `implies_can_view=True` private (not documented) option to it.\r\n\r\nLast step is to refactor the code to use that new property.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1697612168", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1697612168, "node_id": "IC_kwDOBm6k_c5lL4GI", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-29T14:57:54Z", "updated_at": "2023-08-29T14:57:54Z", "author_association": "OWNER", "body": "The code to refactor is this: https://github.com/simonw/datasette/blob/d64a9896f743f87b673d58859a0ec16685594e79/datasette/default_permissions.py#L181-L280\r\n\r\nI'm going to turn that into a more general `restrictions_allow_action` function.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1696644066", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1696644066, "node_id": "IC_kwDOBm6k_c5lILvi", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-29T01:37:47Z", "updated_at": "2023-08-29T03:00:25Z", "author_association": "OWNER", "body": "Code for this might be cleaner with a `Restrictions()` class that takes a `\"_r\"` dictionary to the constructor and can then answer questions like `.any_resource_has_permission(\"view-table\")` - where it can resolve aliases etc as well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1696642671", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1696642671, "node_id": "IC_kwDOBm6k_c5lILZv", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-29T01:35:37Z", "updated_at": "2023-08-29T01:35:37Z", "author_association": "OWNER", "body": "Reminder that I also need to confirm that `insert-row` works if you have it at the instance level, the database level or the resource level in `_r`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1696618784", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1696618784, "node_id": "IC_kwDOBm6k_c5lIFkg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-29T00:58:34Z", "updated_at": "2023-08-29T00:58:34Z", "author_association": "OWNER", "body": "Should this have `implies_can_view=True` too? Probably: https://github.com/simonw/datasette/blob/d64a9896f743f87b673d58859a0ec16685594e79/datasette/default_permissions.py#L20-L22", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1691845306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1691845306, "node_id": "IC_kwDOBm6k_c5k14K6", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-24T14:57:39Z", "updated_at": "2023-08-24T14:57:39Z", "author_association": "OWNER", "body": "Notes on manual testing so far - it looks like this might be working!\r\n- https://github.com/simonw/datasette/issues/2102#issuecomment-1691824713", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/2154#issuecomment-1691788400", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2154", "id": 1691788400, "node_id": "IC_kwDOBm6k_c5k1qRw", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-24T14:25:56Z", "updated_at": "2023-08-24T14:25:56Z", "author_association": "OWNER", "body": "Can be tested with:\r\n```bash\r\npip install https://github.com/simonw/datasette/archive/6d57a8c23043e99b27f7a2afbe58f4d58815fd51.zip\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1865281760, "label": "Cascade for restricted token view-table/view-database/view-instance operations"}, "performed_via_github_app": null}