{"id": 1423336089, "node_id": "I_kwDOBm6k_c5U1mKZ", "number": 1855, "title": "`datasette create-token` ability to create tokens with a reduced set of permissions", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8711695, "label": " Datasette 1.0a2"}, "comments": 19, "created_at": "2022-10-26T02:20:52Z", "updated_at": "2022-12-14T01:24:49Z", "closed_at": "2022-12-13T05:20:24Z", "author_association": "OWNER", "pull_request": null, "body": "Initial design ideas: https://github.com/simonw/datasette/issues/1852#issuecomment-1289733483\r\n\r\n> Token design concept:\r\n> \r\n> ```json\r\n> {\r\n> \"t\": {\r\n> \"a\": [\"ir\", \"ur\", \"dr\"],\r\n> \"d\": {\r\n> \"fixtures\": [\"ir\", \"ur\", \"dr\"]\r\n> },\r\n> \"t\": {\r\n> \"fixtures\": {\r\n> \"searchable\": [\"ir\"]\r\n> }\r\n> }\r\n> }\r\n> }\r\n> ```\r\n> \r\n> That JSON would be minified and signed.\r\n> \r\n> Minified version of the above looks like this (101 characters):\r\n> \r\n> `{\"t\":{\"a\":[\"ir\",\"ur\",\"dr\"],\"d\":{\"fixtures\":[\"ir\",\"ur\",\"dr\"]},\"t\":{\"fixtures\":{\"searchable\":[\"ir\"]}}}}`\r\n> \r\n> The `\"t\"` key shows this is a token that as a default API key.\r\n> \r\n> `\"a\"` means \"all\" - these are permissions that have been granted on all tables and databases.\r\n> \r\n> `\"d\"` means \"databases\" - this is a way to set permissions for all tables in a specific database.\r\n> \r\n> `\"t\"` means \"tables\" - this lets you set permissions at a finely grained table level.\r\n> \r\n> Then the permissions themselves are two character codes which are shortened versions - so:\r\n> \r\n> * `ir` = `insert-row`\r\n> * `ur` = `update-row`\r\n> * `dr` = `delete-row`\r\n\r\n## Remaining tasks\r\n\r\n- [x] Add these options to the `datasette create-token` command\r\n- [x] Tests for `datasette create-token` options\r\n- [x] Documentation for those options at https://docs.datasette.io/en/latest/authentication.html#datasette-create-token\r\n- [x] A way to handle permissions that don't have known abbreviations (permissions added by plugins). Probably need to solve the plugin permission registration problem as part of that\r\n- [x] Stop hard-coding names of actions in the `permission_allowed_actor_restrictions` function", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/1855/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1108235694, "node_id": "I_kwDOBm6k_c5CDlWu", "number": 1603, "title": "A proper favicon", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 3268330, "label": "Datasette 1.0"}, "comments": 19, "created_at": "2022-01-19T15:24:55Z", "updated_at": "2022-03-19T04:04:49Z", "closed_at": "2022-01-20T06:07:31Z", "author_association": "OWNER", "pull_request": null, "body": "Tips here: https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/ - I think a PNG served at `/favicon.ico` is the best option, since safari doesn't support SVG yet.\r\n\r\nRelevant code: https://github.com/simonw/datasette/blob/cb29119db9115b1f40de2fb45263ed77e3bfbb3e/datasette/app.py#L182-L183\r\n\r\nI can reuse the icon for https://datasette.io/desktop", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/1603/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 725184645, "node_id": "MDU6SXNzdWU3MjUxODQ2NDU=", "number": 1034, "title": "Better way of representing binary data in .csv output", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 6026070, "label": "0.51"}, "comments": 19, "created_at": "2020-10-20T04:28:58Z", "updated_at": "2021-06-17T18:13:21Z", "closed_at": "2020-10-29T22:47:46Z", "author_association": "OWNER", "pull_request": null, "body": "I just noticed this: https://latest.datasette.io/fixtures/binary_data.csv\r\n\r\n```csv\r\nrowid,data\r\n1,b'\\x15\\x1c\\x02\\xc7\\xad\\x05\\xfe'\r\n2,b'\\x15\\x1c\\x03\\xc7\\xad\\x05\\xfe'\r\n```\r\nThere's no good way to represent binary data in a CSV file, but this seems like one of the more-bad options.", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/1034/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 736520310, "node_id": "MDU6SXNzdWU3MzY1MjAzMTA=", "number": 196, "title": "Introspect if table is FTS4 or FTS5", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 19, "created_at": "2020-11-05T00:45:50Z", "updated_at": "2020-11-05T03:54:07Z", "closed_at": "2020-11-05T03:54:07Z", "author_association": "OWNER", "pull_request": null, "body": "> I want `.search()` to work against both FTS5 and FTS4 tables - but sort by rank should only work for FTS5.\r\n>\r\n> This means I need to be able to introspect and tell if a table is FTS4 or FTS5.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/192#issuecomment-722054264_", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/196/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"}