datasette/tests
Simon Willison 65c427e4ee Ensure :actor, :actor_id and :action are all available to permissions SQL, closes #2520
- Updated build_rules_union() to accept actor as dict and provide :actor (JSON) and :actor_id
- Updated resolve_permissions_from_catalog() and resolve_permissions_with_candidates() to accept actor dict
- :actor is now the full actor dict as JSON (use json_extract() to access fields)
- :actor_id is the actor's id field for simple comparisons
- :action continues to be available as before
- Updated all call sites and tests to use new parameter format
- Added test demonstrating all three parameters working together
2025-10-24 10:32:18 -07:00
..
plugins datasette.set_actor_cookie() and datasette.delete_actor_cookie(), closes #1690 2025-01-15 17:37:25 -08: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 simple_primary_key now uses integer id, helps close #2458 2025-02-01 21:44:53 -08: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 PluginSQL renamed to PermissionSQL, closes #2524 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 results.dicts() method, closes #2414 2024-09-01 17:20:41 -07:00
test_auth.py Remove legacy event_loop fixture usage 2025-10-01 12:51:23 -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 Remove legacy event_loop fixture usage 2025-10-01 12:51:23 -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 Move Metadata to --internal database 2024-06-11 09:33:23 -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 Hide FTS tables that have content= 2025-04-16 21:44:09 -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 New allowed_resources_sql plugin hook and debug tools (#2505) 2025-10-08 14:27:51 -07:00
test_permissions.py Test improvements and fixed deprecation warnings (#2464) 2025-02-04 14:49:52 -08:00
test_plugins.py PluginSQL renamed to PermissionSQL, closes #2524 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 PluginSQL renamed to PermissionSQL, closes #2524 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 Ensure :actor, :actor_id and :action are all available to permissions SQL, closes #2520 2025-10-24 10:32:18 -07:00
utils.py Test improvements and fixed deprecation warnings (#2464) 2025-02-04 14:49:52 -08:00