pengwk commented on issue #20604: URL: https://github.com/apache/superset/issues/20604#issuecomment-4780997278
Quick update here: I picked this back up in apache/superset#21769 and pushed the latest changes. Based on the discussion above, especially the questions around whether admins should only be able to see saved queries or also edit/delete them, the PR now takes the narrower approach: - Users with `all_query_access` can see/read saved queries created by other users. - Write paths still keep the ownership filter, so `all_query_access` does not allow bulk-deleting another user’s saved query. - This avoids turning saved queries into a full shared ownership model in this PR. Owners/User Groups still seem like the better long-term direction for true sharing or asset adoption workflows. I also kept the UX concerns in mind: - The Saved Queries list includes a `Created by` column. - There is a `Created by` filter, so admins who can see more queries can still narrow the list. - The existing search/filtering behavior remains available. Latest PR changes: - Rebased onto current `master`. - Added toast handling for `created_by` related-field fetch errors. - Cleaned up the export command tests by mocking `can_access_all_queries()` directly. - Added an integration test confirming that `all_query_access` does not bypass ownership for bulk delete. - Addressed minor bot style comments around frontend typing and test type annotations. Local verification: - Saved query API + command integration tests: `44 passed` - Changed-file `pre-commit` passed, including frontend type-check, ruff, and pylint. Thanks everyone for the thoughtful discussion and for keeping this issue alive. I hope this scoped version is a reasonable step forward while leaving the larger owners/User Groups sharing model for a follow-up. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
