mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
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>
This commit is contained in:
parent
7423c1a999
commit
06af34240f
3 changed files with 11 additions and 8 deletions
|
|
@ -30,6 +30,7 @@ async def ds_with_permissions():
|
|||
}
|
||||
}
|
||||
)
|
||||
ds.root_enabled = True
|
||||
await ds.invoke_startup()
|
||||
# Add some test databases
|
||||
ds.add_memory_database("content")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue