pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

No message is displayed if a user with no privilege to terminate a query tries to do so on query tool.

Open pravesh-sharma opened this issue 1 year ago • 0 comments

Describe the bug Suppose there is a user who is a member of another role who does not have the privilege to cancel a query runs a long query and then tries to cancel it he won't be able to as the role does not have the privilege but there is no message or notification is displayed for the same.

To Reproduce

  1. Create a role B which can not log in to the server.
  2. Create another role A which can log in to the server and is a member of role B.
  3. Go to the query tool and execute a long-running query. Now click on the cancel query button.
  4. Observe the connection status it says A command is currently in progress. and the execute script button is now enabled.
  5. If you access the logs an error is there Error Message:must be a member of the role whose query is being canceled or member of pg_signal_backend.

Expected behavior Execute script button should not be enabled as the query is still executing and an error message should be displayed that the query was not cancelled.

Attaching screen recording

https://github.com/pgadmin-org/pgadmin4/assets/111979571/75ae6dd2-2e80-40e9-a012-ea64cdcef2aa

Desktop (please complete the following information):

  • OS: macOS 14
  • Version: 8.6
  • Mode: Desktop

pravesh-sharma avatar May 16 '24 08:05 pravesh-sharma