Remove docs for obsolete register_permissions() hook, refs #2528

Also removed docs for datasette.get_permission() method which no longer exists.
This commit is contained in:
Simon Willison 2025-11-01 20:23:37 -07:00
commit 506ce5b0ac
3 changed files with 7 additions and 67 deletions

View file

@ -272,14 +272,14 @@ The dictionary keys are the name of the database that is used in the URL - e.g.
All databases are listed, irrespective of user permissions.
.. _datasette_permissions:
.. _datasette_actions:
.permissions
------------
.actions
--------
Property exposing a dictionary of permissions that have been registered using the :ref:`plugin_register_permissions` plugin hook.
Property exposing a dictionary of actions that have been registered using the :ref:`plugin_register_actions` plugin hook.
The dictionary keys are the permission names - e.g. ``view-instance`` - and the values are ``Permission()`` objects describing the permission. Here is a :ref:`description of that object <plugin_register_permissions>`.
The dictionary keys are the action names - e.g. ``view-instance`` - and the values are ``Action()`` objects describing the permission.
.. _datasette_plugin_config:
@ -594,16 +594,6 @@ The following example creates a token that can access ``view-instance`` and ``vi
},
)
.. _datasette_get_permission:
.get_permission(name_or_abbr)
-----------------------------
``name_or_abbr`` - string
The name or abbreviation of the permission to look up, e.g. ``view-table`` or ``vt``.
Returns a :ref:`Permission object <plugin_register_permissions>` representing the permission, or raises a ``KeyError`` if one is not found.
.. _datasette_get_database:
.get_database(name)