issue_comments

14 rows where issue = 631931408 sorted by updated_at descending

View and edit SQL

Suggested facets: created_at (date), updated_at (date)

user

issue

  • Canned query permissions mechanism · 14

author_association

id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue
640160487 https://github.com/simonw/datasette/issues/800#issuecomment-640160487 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDE2MDQ4Nw== simonw 9599 2020-06-07T05:34:07Z 2020-06-07T05:34:07Z OWNER

See #810 for work to finish this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640123488 https://github.com/simonw/datasette/issues/800#issuecomment-640123488 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEyMzQ4OA== simonw 9599 2020-06-06T21:59:14Z 2020-06-06T21:59:14Z OWNER

I didn't build this quite right: it should be using the permissions plugin hook.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640108835 https://github.com/simonw/datasette/issues/800#issuecomment-640108835 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEwODgzNQ== simonw 9599 2020-06-06T19:42:46Z 2020-06-06T19:42:46Z OWNER

This is implemented and documented: https://datasette.readthedocs.io/en/latest/authentication.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640103204 https://github.com/simonw/datasette/issues/800#issuecomment-640103204 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEwMzIwNA== simonw 9599 2020-06-06T18:52:56Z 2020-06-06T18:52:56Z OWNER

I'm also going to add an indicator to the UI next to queries that you can only execute because you are signed in:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640102200 https://github.com/simonw/datasette/issues/800#issuecomment-640102200 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEwMjIwMA== simonw 9599 2020-06-06T18:45:11Z 2020-06-06T18:45:11Z OWNER

In the code that's:

https://github.com/simonw/datasette/blob/9c563d6aed072f14d3d25f58e84659f9caa1a243/datasette/views/database.py#L56-L64

And:

https://github.com/simonw/datasette/blob/9c563d6aed072f14d3d25f58e84659f9caa1a243/datasette/views/database.py#L98-L112

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640101762 https://github.com/simonw/datasette/issues/800#issuecomment-640101762 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEwMTc2Mg== simonw 9599 2020-06-06T18:41:20Z 2020-06-06T18:41:20Z OWNER

Now the actual permission checks. I need these in two places: the code that generates the list of available queries on https://latest.datasette.io/fixtures#queries and the query page itself at https://latest.datasette.io/fixtures/pragma_cache_size

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640101625 https://github.com/simonw/datasette/issues/800#issuecomment-640101625 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDEwMTYyNQ== simonw 9599 2020-06-06T18:40:09Z 2020-06-06T18:40:09Z OWNER

Documentation for actor_matches_allow: https://github.com/simonw/datasette/blob/14f6b4d200f24940a795ddc0825319ab2891bde2/docs/authentication.rst#actor_matches_allow

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640099707 https://github.com/simonw/datasette/issues/800#issuecomment-640099707 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDA5OTcwNw== simonw 9599 2020-06-06T18:24:54Z 2020-06-06T18:24:54Z OWNER

Next step: a utility function and tests for matching actors to allow blocks.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640099404 https://github.com/simonw/datasette/issues/800#issuecomment-640099404 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDA5OTQwNA== simonw 9599 2020-06-06T18:22:10Z 2020-06-06T18:24:26Z OWNER

Docs here: https://github.com/simonw/datasette/blob/d4c7b85f556230923d37ff327a068ed08aa9b62b/docs/authentication.rst#setting-permissions-for-canned-queries

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640099434 https://github.com/simonw/datasette/issues/800#issuecomment-640099434 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDA5OTQzNA== simonw 9599 2020-06-06T18:22:29Z 2020-06-06T18:22:29Z OWNER

I should add the '*' bit to the docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640090575 https://github.com/simonw/datasette/issues/800#issuecomment-640090575 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDA5MDU3NQ== simonw 9599 2020-06-06T17:06:28Z 2020-06-06T17:06:28Z OWNER

I'm going to implement this documentation-first.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
640090343 https://github.com/simonw/datasette/issues/800#issuecomment-640090343 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDY0MDA5MDM0Mw== simonw 9599 2020-06-06T17:04:36Z 2020-06-06T17:04:36Z OWNER

I like this mechanism better than the SQL query one. Constructing SQL queries that return true if a particular string is embedded inside a JSON list in a larger object is decidedly non-trivial.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
639803719 https://github.com/simonw/datasette/issues/800#issuecomment-639803719 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDYzOTgwMzcxOQ== simonw 9599 2020-06-05T20:40:34Z 2020-06-05T20:40:34Z OWNER

It's a bit obscure though. I'll try building both and see how they feel in practice.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408
639803099 https://github.com/simonw/datasette/issues/800#issuecomment-639803099 https://api.github.com/repos/simonw/datasette/issues/800 MDEyOklzc3VlQ29tbWVudDYzOTgwMzA5OQ== simonw 9599 2020-06-05T20:39:34Z 2020-06-05T20:39:34Z OWNER

Maybe #801 (configuring permissions with a SQL query) is enough here - might not need this mechanism at all, since that mechanism covers it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Canned query permissions mechanism 631931408

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Query took 27.013ms · About: github-to-sqlite