Skip to main content

datasette-debug-permissions

PyPI Changelog Tests License

A Datasette plugin that outputs debug information about permission checks.

Installation

datasette install datasette-debug-permissions

Usage

This plugin adds debugging output to standard error as Datasette is running showing any times the permission_allowed() plugin hook is called.

See Authentication and permissions in the Datasette documentation for more on why this is useful.

Example output

INFO:     Uvicorn running on http://127.0.0.1:8833 (Press CTRL+C to quit)
permission_allowed: action=view-instance, resource=<None>, actor=<None>
permission_allowed: action=view-database, resource=_internal, actor=<None>
permission_allowed: action=view-database, resource=mydatabase, actor=<None>
permission_allowed: action=view-database, resource=mydatabase, actor=<None>
permission_allowed: action=view-table, resource=('mydatabase', 'mytable'), actor=<None>
permission_allowed: action=view-table, resource=('mydatabase', 'mytable'), actor=<None>
permission_allowed: action=view-instance, resource=<None>, actor=<None>
permission_allowed: action=view-instance, resource=<None>, actor=<None>
permission_allowed: action=debug-menu, resource=<None>, actor=<None>

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-debug-permissions
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To install the JavaScript build dependencies, run this:

npm install

You can use the Just command runner to build the TypeScript to minified JavaScript like this:

just js

To run the tests:

pytest

Release files for datasette-debug-permissions 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datasette-debug-permissions 0.1
File Size Uploaded
datasette-debug-permissions-0.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datasette-debug-permissions 0.1
File Interpreter ABI Platform
datasette_debug_permissions-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / datasette-debug-permissions-0.1.tar.gz

Download URL datasette-debug-permissions-0.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
169737e1725ebbba498a04d5d582e9708a57857cf3c385c768be23f3b47f8b80
BLAKE2b-256 checksum
How to use checksums
86b78ff2acc8e6dd7c8887efe480f282c1c058f6262f1ee5179d7823d65654ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / datasette_debug_permissions-0.1-py3-none-any.whl

Download URL datasette_debug_permissions-0.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82a16068ae5ea76648ebe843f78d975e15ff2eb00dbf484dbc751228b96e146d
BLAKE2b-256 checksum
How to use checksums
7b2fa06eb3979dad4deb77b3906cc96e13bc0209bce09b699e1e167781bc67a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page