Jira admins must grant the rest of the users with Global permission.
...
In spite of all the queries can be executed safely by anyone in the question of results, there are some measures of admin control. Constraints are applied for writing queries from the console and gadgets, and running queries from third-party tools. Jira Administrator can configure who can do it via global permissions:
...
To be able to run a query in third-party-tool User need permission “SQL Cloud Share“ which gives access to SQL Cloud Server, through which he can share queries usingJDBC/ODATA
...