From 2b962beaeb90e1966cd5dfe0d3d3ed8250367d2b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 1 Nov 2025 11:51:22 -0700 Subject: [PATCH] Fix permissions_execute_sql warnings in documentation --- docs/pages.rst | 4 ++-- docs/plugin_hooks.rst | 2 +- docs/settings.rst | 2 +- docs/sql_queries.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages.rst b/docs/pages.rst index 3ba20ea7..3d6530a3 100644 --- a/docs/pages.rst +++ b/docs/pages.rst @@ -28,7 +28,7 @@ The index page can also be accessed at ``/-/``, useful for if the default index Database ======== -Each database has a page listing the tables, views and canned queries available for that database. If the :ref:`permissions_execute_sql` permission is enabled (it's on by default) there will also be an interface for executing arbitrary SQL select queries against the data. +Each database has a page listing the tables, views and canned queries available for that database. If the :ref:`actions_execute_sql` permission is enabled (it's on by default) there will also be an interface for executing arbitrary SQL select queries against the data. Examples: @@ -60,7 +60,7 @@ The following tables are hidden by default: Queries ======= -The ``/database-name/-/query`` page can be used to execute an arbitrary SQL query against that database, if the :ref:`permissions_execute_sql` permission is enabled. This query is passed as the ``?sql=`` query string parameter. +The ``/database-name/-/query`` page can be used to execute an arbitrary SQL query against that database, if the :ref:`actions_execute_sql` permission is enabled. This query is passed as the ``?sql=`` query string parameter. This means you can link directly to a query by constructing the following URL: diff --git a/docs/plugin_hooks.rst b/docs/plugin_hooks.rst index 859b0c84..3156aa7d 100644 --- a/docs/plugin_hooks.rst +++ b/docs/plugin_hooks.rst @@ -1426,7 +1426,7 @@ Here's an example that allows users to view the ``admin_log`` table only if thei return inner -See :ref:`built-in permissions ` for a full list of permissions that are included in Datasette core. +See :ref:`built-in permissions ` for a full list of permissions that are included in Datasette core. Example: `datasette-permissions-sql `_ diff --git a/docs/settings.rst b/docs/settings.rst index 62810952..5cd49113 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -69,7 +69,7 @@ default_allow_sql Should users be able to execute arbitrary SQL queries by default? -Setting this to ``off`` causes permission checks for :ref:`permissions_execute_sql` to fail by default. +Setting this to ``off`` causes permission checks for :ref:`actions_execute_sql` to fail by default. :: diff --git a/docs/sql_queries.rst b/docs/sql_queries.rst index a95ccc87..7c3cd4ac 100644 --- a/docs/sql_queries.rst +++ b/docs/sql_queries.rst @@ -7,7 +7,7 @@ Datasette treats SQLite database files as read-only and immutable. This means it The easiest way to execute custom SQL against Datasette is through the web UI. The database index page includes a SQL editor that lets you run any SELECT query you like. You can also construct queries using the filter interface on the tables page, then click "View and edit SQL" to open that query in the custom SQL editor. -Note that this interface is only available if the :ref:`permissions_execute_sql` permission is allowed. See :ref:`authentication_permissions_execute_sql`. +Note that this interface is only available if the :ref:`actions_execute_sql` permission is allowed. See :ref:`authentication_permissions_execute_sql`. Any Datasette SQL query is reflected in the URL of the page, allowing you to bookmark them, share them with others and navigate through previous queries using your browser back button.