From 613fa551a1be31645deb0ece4b46638c181827e0 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 7 Jun 2020 20:14:27 -0700 Subject: [PATCH] Removed view-row permission, for the moment - refs #811 https://github.com/simonw/datasette/issues/811#issuecomment-640338347 --- datasette/views/table.py | 3 --- docs/authentication.rst | 13 ------------- tests/test_html.py | 1 - 3 files changed, 17 deletions(-) diff --git a/datasette/views/table.py b/datasette/views/table.py index 10d6725a..935fed3d 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -851,9 +851,6 @@ class RowView(RowTableShared): await self.check_permission(request, "view-instance") await self.check_permission(request, "view-database", "database", database) await self.check_permission(request, "view-table", "table", (database, table)) - await self.check_permission( - request, "view-row", "row", tuple([database, table] + list(pk_values)) - ) db = self.ds.databases[database] pks = await db.primary_keys(table) use_rowid = not pks diff --git a/docs/authentication.rst b/docs/authentication.rst index 1bf2a1a5..2caca66f 100644 --- a/docs/authentication.rst +++ b/docs/authentication.rst @@ -206,19 +206,6 @@ Actor is allowed to view a table (or view) page, e.g. https://latest.datasette.i ``resource_identifier`` - tuple: (string, string) The name of the database, then the name of the table -.. _permissions_view_row: - -view-row --------- - -Actor is allowed to view a row page, e.g. https://latest.datasette.io/fixtures/compound_primary_key/a,b - -``resource_type`` - string - "row" - -``resource_identifier`` - tuple: (string, string, strings...) - The name of the database, then the name of the table, then the primary key of the row. The primary key may be a single value or multiple values, so the ``resource_identifier`` tuple may be three or more items long. - .. _permissions_view_query: view-query diff --git a/tests/test_html.py b/tests/test_html.py index 4e913bcf..e05640d7 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -210,7 +210,6 @@ def test_row_page_does_not_truncate(): [ "view-instance", ("view-table", "table", ("fixtures", "facetable")), - ("view-row", "row", ("fixtures", "facetable", "1")), ], ) table = Soup(response.body, "html.parser").find("table")