Skip to content

Fix /-/check 500 error on query-scoped actions#2758

Open
truffle-dev wants to merge 1 commit into
simonw:mainfrom
truffle-dev:fix/check-query-scoped-actions
Open

Fix /-/check 500 error on query-scoped actions#2758
truffle-dev wants to merge 1 commit into
simonw:mainfrom
truffle-dev:fix/check-query-scoped-actions

Conversation

@truffle-dev
Copy link
Copy Markdown

Closes #2756.

_check_permission_for_actor builds child-level resources with hardcoded table=child, which raises TypeError for QueryResource (it accepts query=, not table=). Visiting /-/check?action=delete-query (or view-query, update-query) returned a 500.

Switched the call to positional args so it works with every Resource subclass regardless of the second-parameter name.

Verification: with the fix reverted via git stash, the three new parametrized cases reproduce the original TypeError; restoring it makes them pass. Full tests/test_permissions.py and tests/test_actions_sql.py runs are green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QueryResource.__init__() got an unexpected keyword argument 'table'

1 participant