mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
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:
parent
063bf7a96f
commit
506ce5b0ac
3 changed files with 7 additions and 67 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue