shuwenwei opened a new pull request, #18359: URL: https://github.com/apache/iotdb/pull/18359
## Summary - Restrict tree-model `SHOW QUERIES` results to the current user when the user does not have the `SYSTEM` privilege. - Allow users with the `SYSTEM` privilege to view queries from all users. - Add `IoTDBShowQueriesIT` to cover both privilege states with a query that remains active across Session fetches. ## Root cause `TreeAccessCheckVisitor.visitShowQueries` set `allowedUsername` under the wrong privilege condition. As a result, an unprivileged user could see other users' queries, while a privileged user could be unnecessarily restricted. ## Impact Tree-model `SHOW QUERIES` now applies the intended visibility rules for users with and without the `SYSTEM` privilege. ## Validation - Added an integration test that leaves a result set unconsumed and verifies query visibility before and after granting `SYSTEM`. - Tests were not run locally, following the repository instruction not to proactively run build or test checks unless requested. -- 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]
