There are two three incorporated instruments within Jira through which you can share your queries with colleagues on Dashboard:
SQL Cloud
...
SQL Cloud - Pivot Table
...
...
...
SQL Cloud - Google Chart
...
All gadgets work according to Jira permissions. That means that shared queries will be run accordingly to the granted user permissions. You don't have to worry that someone who doesn't have access or appropriate permission will see your query, as well as your colleagues get individual results according to their user permissions.
...