Removed view-row permission, for the moment - refs #811

https://github.com/simonw/datasette/issues/811#issuecomment-640338347
pull/819/head
Simon Willison 2020-06-07 20:14:27 -07:00
rodzic cd92e4fe2a
commit 613fa551a1
3 zmienionych plików z 0 dodań i 17 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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")