Documenting both false and {} for "deny all" is confusing

Refs #906
This commit is contained in:
Simon Willison 2020-07-25 14:44:42 -07:00 committed by GitHub
commit 3c33b42132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,15 +94,7 @@ This will match any actors with an ``"id"`` property of ``"root"`` - for example
"name": "Root User"
}
An allow block can specify "deny all" using an empty ``{}`` (`demo <https://latest.datasette.io/-/allow-debug?actor=%7B%0D%0A++++%22id%22%3A+%22root%22%0D%0A%7D&allow=%7B%7D>`__):
.. code-block:: json
{
"allow": {}
}
You can also use ``false`` to deny all (`demo <https://latest.datasette.io/-/allow-debug?actor=%7B%0D%0A++++%22id%22%3A+%22root%22%0D%0A%7D&allow=false>`__):
An allow block can specify "deny all" using ``false`` (`demo <https://latest.datasette.io/-/allow-debug?actor=%7B%0D%0A++++%22id%22%3A+%22root%22%0D%0A%7D&allow=false>`__):
.. code-block:: json
@ -529,4 +521,4 @@ permissions-debug
Actor is allowed to view the ``/-/permissions`` debug page.
Default *deny*.
Default *deny*.