mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
datasette.allowed_resources_sql() returns namedtuple
This commit is contained in:
parent
400fa08e4c
commit
e5f392ae7a
3 changed files with 20 additions and 5 deletions
|
|
@ -467,7 +467,7 @@ This method uses :ref:`datasette_allowed_resources_sql` under the hood and is an
|
|||
await .allowed_resources_sql(\*, action, actor=None, parent=None, include_is_private=False)
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
Builds the SQL query that Datasette uses to determine which resources an actor may access for a specific action. Returns a ``(sql: str, params: dict)`` tuple that can be executed against the internal ``catalog_*`` database tables. ``parent`` can be used to limit results to a specific database, and ``include_is_private`` adds a column indicating whether anonymous users would be denied access to that resource.
|
||||
Builds the SQL query that Datasette uses to determine which resources an actor may access for a specific action. Returns a ``(sql: str, params: dict)`` namedtuple that can be executed against the internal ``catalog_*`` database tables. ``parent`` can be used to limit results to a specific database, and ``include_is_private`` adds a column indicating whether anonymous users would be denied access to that resource.
|
||||
|
||||
Plugins that need to execute custom analysis over the raw allow/deny rules can use this helper to run the same query that powers the ``/-/allowed`` debugging interface.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue