diff --git a/docs/authentication.rst b/docs/authentication.rst index d720c4db..659c6989 100644 --- a/docs/authentication.rst +++ b/docs/authentication.rst @@ -771,6 +771,8 @@ Datasette defaults to allowing any site visitor to execute their own custom SQL Access to this ability is controlled by the :ref:`actions_execute_sql` permission. +This permission does not apply to structured table-browsing operations where Datasette constructs the SQL, such as sorting, column filters and :ref:`facets`. Faceting is controlled separately by the :ref:`setting_allow_facet` setting. + The easiest way to disable arbitrary SQL queries is using the :ref:`default_allow_sql setting ` when you first start Datasette running. You can alternatively use an ``"allow_sql"`` block to control who is allowed to execute arbitrary SQL queries. @@ -1521,6 +1523,8 @@ execute-sql Actor is allowed to run arbitrary read-only SQL queries against a specific database using the :ref:`custom SQL query page `, e.g. https://latest.datasette.io/fixtures/-/query?sql=select+100 +This action also controls raw SQL supplied using ``?_where=``. It does not control structured table-browsing features such as :ref:`facets`, which use SQL generated by Datasette and are controlled by :ref:`setting_allow_facet`. + ``resource`` - ``datasette.resources.DatabaseResource(database)`` ``database`` is the name of the database (string) diff --git a/docs/facets.rst b/docs/facets.rst index 960ac03a..55802a9d 100644 --- a/docs/facets.rst +++ b/docs/facets.rst @@ -14,6 +14,8 @@ Here's `an example