datasette/datasette/views
Simon Willison 4d93149c2b Fix permission endpoint tests by resolving method signature conflicts
- Renamed internal allowed_resources_sql() to _build_permission_rules_sql()
  to avoid conflict with public method
- Made public allowed_resources_sql() keyword-only to prevent argument order bugs
- Fixed PermissionRulesView to use _build_permission_rules_sql() which returns
  full permission rules (with allow/deny) instead of filtered resources
- Fixed _build_permission_rules_sql() to pass actor dict to build_rules_union()
- Added actor_id extraction in AllowedResourcesView
- Added root_enabled=True to test fixture to grant permissions-debug to root user

All 51 tests in test_permission_endpoints.py now pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:53:07 -07:00
..
__init__.py Drop 3.8 testing, add 3.13 testing, upgrade Black 2025-03-09 20:45:18 -07:00
base.py New allowed_resources_sql plugin hook and debug tools (#2505) 2025-10-08 14:27:51 -07:00
database.py Add DatabaseContext dataclass for consistent template context documentation (#2513) 2025-10-09 12:54:02 -07:00
index.py /-/ alternative URL for homepage, closes #2393 2024-08-14 17:57:13 -07:00
row.py results.dicts() method, closes #2414 2024-09-01 17:20:41 -07:00
special.py Fix permission endpoint tests by resolving method signature conflicts 2025-10-23 14:53:07 -07:00
table.py fix: tilde encode database name in expanded foreign key links (#2476) 2025-04-16 22:15:11 -07:00