home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 1865281760 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 7
  • codecov[bot] 1

author_association 2

  • OWNER 7
  • NONE 1

issue 1

  • Cascade for restricted token view-table/view-database/view-instance operations · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1691798722 https://github.com/simonw/datasette/pull/2154#issuecomment-1691798722 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5k1szC codecov[bot] 22429695 2023-08-24T14:31:42Z 2023-08-29T16:15:12Z NONE

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03% :tada:

Comparison is base (2e28258) 92.82% compared to head (3e49fd3) 92.85%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2154 +/- ## ========================================== + Coverage 92.82% 92.85% +0.03% ========================================== Files 40 40 Lines 5948 6008 +60 ========================================== + Hits 5521 5579 +58 - Misses 427 429 +2 ``` | [Files Changed](https://app.codecov.io/gh/simonw/datasette/pull/2154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [datasette/views/special.py](https://app.codecov.io/gh/simonw/datasette/pull/2154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3NwZWNpYWwucHk=) | `94.06% <ø> (-0.85%)` | :arrow_down: | | [datasette/app.py](https://app.codecov.io/gh/simonw/datasette/pull/2154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.37% <100.00%> (+0.07%)` | :arrow_up: | | [datasette/default\_permissions.py](https://app.codecov.io/gh/simonw/datasette/pull/2154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2RlZmF1bHRfcGVybWlzc2lvbnMucHk=) | `97.48% <100.00%> (+0.57%)` | :arrow_up: | | [datasette/permissions.py](https://app.codecov.io/gh/simonw/datasette/pull/2154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3Blcm1pc3Npb25zLnB5) | `100.00% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/simonw/datasette/pull/2154/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1697725150 https://github.com/simonw/datasette/pull/2154#issuecomment-1697725150 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5lMTre simonw 9599 2023-08-29T15:54:12Z 2023-08-29T15:54:12Z OWNER

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.

Last step is to refactor the code to use that new property.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1697612168 https://github.com/simonw/datasette/pull/2154#issuecomment-1697612168 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5lL4GI simonw 9599 2023-08-29T14:57:54Z 2023-08-29T14:57:54Z OWNER

The code to refactor is this: https://github.com/simonw/datasette/blob/d64a9896f743f87b673d58859a0ec16685594e79/datasette/default_permissions.py#L181-L280

I'm going to turn that into a more general restrictions_allow_action function.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1696644066 https://github.com/simonw/datasette/pull/2154#issuecomment-1696644066 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5lILvi simonw 9599 2023-08-29T01:37:47Z 2023-08-29T03:00:25Z OWNER

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.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1696642671 https://github.com/simonw/datasette/pull/2154#issuecomment-1696642671 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5lILZv simonw 9599 2023-08-29T01:35:37Z 2023-08-29T01:35:37Z OWNER

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.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1696618784 https://github.com/simonw/datasette/pull/2154#issuecomment-1696618784 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5lIFkg simonw 9599 2023-08-29T00:58:34Z 2023-08-29T00:58:34Z OWNER

Should this have implies_can_view=True too? Probably: https://github.com/simonw/datasette/blob/d64a9896f743f87b673d58859a0ec16685594e79/datasette/default_permissions.py#L20-L22

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1691845306 https://github.com/simonw/datasette/pull/2154#issuecomment-1691845306 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5k14K6 simonw 9599 2023-08-24T14:57:39Z 2023-08-24T14:57:39Z OWNER

Notes on manual testing so far - it looks like this might be working! - https://github.com/simonw/datasette/issues/2102#issuecomment-1691824713

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  
1691788400 https://github.com/simonw/datasette/pull/2154#issuecomment-1691788400 https://api.github.com/repos/simonw/datasette/issues/2154 IC_kwDOBm6k_c5k1qRw simonw 9599 2023-08-24T14:25:56Z 2023-08-24T14:25:56Z OWNER

Can be tested with: bash pip install https://github.com/simonw/datasette/archive/6d57a8c23043e99b27f7a2afbe58f4d58815fd51.zip

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cascade for restricted token view-table/view-database/view-instance operations 1865281760  

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])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 22.909ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows