Document datasette.allowed(), PermissionSQL class, and SQL parameters

- Added documentation for datasette.allowed() method with keyword-only arguments
- Added comprehensive PermissionSQL class documentation with examples
- Documented the three SQL parameters available: :actor, :actor_id, :action
- Included examples of using json_extract() to access actor fields
- Explained permission resolution rules (specificity, deny over allow, implicit deny)
- Fixed RST formatting warnings (escaped asterisk, fixed underline length)
This commit is contained in:
Simon Willison 2025-10-23 12:42:10 -07:00
commit b8d26754df
2 changed files with 169 additions and 1 deletions

View file

@ -1445,7 +1445,7 @@ Example: `datasette-permissions-sql <https://datasette.io/plugins/datasette-perm
.. _plugin_hook_permission_resources_sql:
permission_resources_sql(datasette, actor, action)
-------------------------------------------------
---------------------------------------------------
``datasette`` - :ref:`internals_datasette`
Access to the Datasette instance.