datasette/tests
Simon Willison a2994cc5bb Remove automatic parameter namespacing from permission plugins
Simplifies the permission system by removing automatic parameter namespacing.
Plugins are now responsible for using unique parameter names. The recommended
convention is to prefix parameters with the plugin source name (e.g.,
:myplugin_user_id). System reserves :actor, :actor_id, :action, :filter_parent.

- Remove _namespace_params() function from datasette/utils/permissions.py
- Update build_rules_union() to use plugin params directly
- Document parameter naming convention in plugin_hooks.rst
- Update example plugins to use prefixed parameters
- Add test_multiple_plugins_with_own_parameters() to verify convention works
2025-10-24 11:44:43 -07:00
..
plugins Add register_actions hook to test plugin and improve test 2025-10-24 10:32:18 -07:00
test_templates Fix handling of nested custom page wildcard paths, closes #996 2020-10-07 15:51:11 -07:00
__init__.py Broke up test_app into test_api and test_html 2017-12-15 04:08:24 -08:00
build_small_spatialite_db.py New run_sanity_checks mechanism, for SpatiLite 2019-05-11 15:55:30 -07:00
conftest.py Use venv Python to launch datasette fixtures 2025-10-01 12:49:09 -07:00
ext.c Add new entrypoint option to --load-extensions. (#1789) 2022-08-23 11:34:30 -07:00
fixtures.py Add register_actions hook to test plugin and improve test 2025-10-24 10:32:18 -07:00
spatialite.db New run_sanity_checks mechanism, for SpatiLite 2019-05-11 15:55:30 -07:00
test-datasette-load-plugins.sh fix (typo): Corrected spelling of 'environments' (#2268) 2024-02-19 14:41:32 -08:00
test_actions_sql.py Fix schema mismatch in empty result query 2025-10-24 10:32:18 -07:00
test_api.py Hide FTS tables that have content= 2025-04-16 21:44:09 -07:00
test_api_write.py Fixed some more tests 2025-10-24 10:32:18 -07:00
test_auth.py Fixed some more tests 2025-10-24 10:32:18 -07:00
test_base_view.py New View base class (#2080) 2023-05-25 17:18:43 -07:00
test_black.py Remove legacy event_loop fixture usage 2025-10-01 12:51:23 -07:00
test_canned_queries.py Correct syntax for link headers, closes #2470 2025-03-09 20:05:43 -05:00
test_cli.py Error on startup if invalid setting types 2025-10-24 10:32:18 -07:00
test_cli_serve_get.py Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363) 2024-07-15 10:33:51 -07:00
test_cli_serve_server.py Move HTTPS test to a bash script 2022-12-17 18:33:07 -08:00
test_config_dir.py Error on startup if invalid setting types 2025-10-24 10:32:18 -07:00
test_config_permission_rules.py New allowed_resources_sql plugin hook and debug tools (#2505) 2025-10-08 14:27:51 -07:00
test_crossdb.py Remove obsolete mix_stderr=False 2025-09-30 14:33:24 -07:00
test_csv.py simple_primary_key now uses integer id, helps close #2458 2025-02-01 21:44:53 -08:00
test_custom_pages.py Remove hashed URL mode 2022-03-18 17:12:03 -07:00
test_datasette_https_server.sh Detect server start/stop more reliably. 2022-12-18 08:01:51 -08:00
test_docs.py Upgrade to latest Black, closes #2239 2024-01-30 19:55:26 -08:00
test_docs_plugins.py Docs on temporary plugins in fixtures, closes #2234 2024-01-12 14:12:14 -08:00
test_facets.py Consider just 1000 rows for suggest facet, closes #2406 2024-08-21 13:36:42 -07:00
test_filters.py ?column_notcontains= table filter, closes #2287 2024-02-27 16:07:41 -08:00
test_html.py Fix test_navigation_menu_links by enabling root_enabled for root actor 2025-10-24 10:32:18 -07:00
test_internal_db.py catalog_views table, closes #2495 2025-07-15 10:22:56 -07:00
test_internals_database.py Hide FTS tables that have content= 2025-04-16 21:44:09 -07:00
test_internals_datasette.py Support nested JSON in metadata.json, closes #2403 2024-08-21 09:53:52 -07:00
test_internals_datasette_client.py A bunch of remaining ds_client conversions, refs #1959 2022-12-17 13:47:55 -08:00
test_internals_request.py Request.fake(... url_vars), plus .fake() is now documented 2022-03-31 19:01:58 -07:00
test_internals_response.py response.set_cookie(), closes #795 2020-06-09 15:19:37 -07:00
test_internals_urls.py Remove hashed URL mode 2022-03-18 17:12:03 -07:00
test_label_column_for_table.py Detect single unique text column in label_column_for_table, closes #2458 2025-02-01 17:02:49 -08:00
test_load_extensions.py Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363) 2024-07-15 10:33:51 -07:00
test_messages.py Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363) 2024-07-15 10:33:51 -07:00
test_package.py Upgrade Docker images to Python 3.11, closes #1853 2022-10-25 12:04:53 -07:00
test_permission_endpoints.py Fix #2509: Settings-based deny rules now override root user privileges 2025-10-24 11:13:19 -07:00
test_permissions.py Fix permission_allowed_sql_bridge to not apply defaults, closes #2526 2025-10-24 10:32:18 -07:00
test_plugins.py Add register_actions hook to test plugin and improve test 2025-10-24 10:32:18 -07:00
test_publish_cloudrun.py Use service-specific image ID for Cloud Run deploys, refs #2036 2023-03-08 12:25:55 -08:00
test_publish_heroku.py Upgrade to Python 3.11 on Heroku, refs #1905 2022-11-18 16:44:46 -08:00
test_routes.py Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363) 2024-07-15 10:33:51 -07:00
test_spatialite.py Skip SpatiaLite test if no conn.enable_load_extension() 2022-09-05 17:09:57 -07:00
test_table_api.py simple_primary_key now uses integer id, helps close #2458 2025-02-01 21:44:53 -08:00
test_table_html.py fix: tilde encode database name in expanded foreign key links (#2476) 2025-04-16 22:15:11 -07:00
test_tables_endpoint.py Use allowed_resources_sql() with CTE for table filtering 2025-10-24 10:32:18 -07:00
test_tracer.py Tracer now catches errors, closes #2405 2024-08-21 12:19:18 -07:00
test_utils.py Fix bug where -s could reset settings to defaults, closes #2389 2024-08-14 14:28:48 -07:00
test_utils_check_callable.py Rename callable.py to check_callable.py, refs #2078 2023-05-25 11:49:40 -07:00
test_utils_permissions.py Remove automatic parameter namespacing from permission plugins 2025-10-24 11:44:43 -07:00
utils.py Test improvements and fixed deprecation warnings (#2464) 2025-02-04 14:49:52 -08:00