Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterized query does not work for viewers #654

Closed
broglia opened this issue Aug 1, 2024 · 2 comments
Closed

Parameterized query does not work for viewers #654

broglia opened this issue Aug 1, 2024 · 2 comments

Comments

@broglia
Copy link

broglia commented Aug 1, 2024

Hi,
when I create a parameterized query like:

select count(*)
from products
where published_at > '$$start:2024-01-01$$'

Everything works fine for the user with change permission.

When a user with "view" permission tries to open it, there are following issues:

  • clicking on the refresh link doesn't have any effect. Even if the user changes the value of the parameter, the output isn't updated.
  • the sql box remains open (in previous versions it was collapsed)

If may help, looking in the browser console I can see the following js error:
TypeError: Cannot read properties of null (reading 'addEventListener')
at rC.bind (explorer.5.0.2.js:69:7611)
document.getElementById("show_schema_button").addEventListener("click", this.showSchema.bind(this)),

@chrisclark chrisclark mentioned this issue Aug 1, 2024
@chrisclark
Copy link
Collaborator

Thanks so much for the report and the help debugging! This is fixed (along with the styling issue of the Refresh button) here:
#655

I will get it merged shortly, and release 5.1.1

@broglia
Copy link
Author

broglia commented Aug 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants