home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1691753489

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/2153#issuecomment-1691753489 https://api.github.com/repos/simonw/datasette/issues/2153 1691753489 IC_kwDOBm6k_c5k1hwR 9599 2023-08-24T14:07:25Z 2023-08-24T14:09:16Z OWNER

Building that "_r" array is the main reason this would be useful, but it's also fiddly to get right.

datasette create-token has a design for that already: https://docs.datasette.io/en/1.0a4/authentication.html#datasette-create-token datasette create-token root \ --secret mysecret \ --all view-instance \ --all view-table \ --database docs view-query \ --resource docs documents insert-row \ --resource docs documents update-row Adding imitations of those options (excluding --secret, not needed here) to datasette serve would add a LOT of extra options, but it would also make it really convenient to attempt a request with a specific set of restrictions. Not sure if that would be worth the extra --help output or not.

I feel like the names would have to have a common prefix though. Maybe something like this:

bash datasette serve data.db --get `/data/mytable.json' \ --actor-id root \ --r-all view-instance \ --r-database data view-query \ --r-resource data documents update-row Other options could be the longer --restrict-all/--restrict-database/--restrict-resource.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1865232341  
Powered by Datasette · Queries took 0.861ms · About: github-to-sqlite