uzegonemad commented on issue #36500:
URL: https://github.com/apache/superset/issues/36500#issuecomment-4836764481
@rusackas I believe I got to the bottom of this one.
I'm running 6.1 and experiencing the same issue with embedded.
The response I get when I press "View Query" on a chart in an embedded
dashboard:
```json
{"result": [{"language": "sql"}, {"language": "sql"}]}
```
Looks like
[charts/data/api.py](https://github.com/apache/superset/blob/f2048886c0d1e874e53bc70aed818941011b1897/superset/charts/data/api.py#L449-L451)
removes the `query` key for guest users.
Adding a check for `can_view_query` made it work for me.
```python
if security_manager.is_guest_user() and not
security_manager.can_access("can_view_query", "Dashboard"):
```
---
I don't think it matters given the above but my guest role has these perms:
- can drill Dashboard
- can get drill info Dashboard
- can read Chart
- can read CurrentUserRestApi
- can read Dashboard
- can read Dataset
- can read Explore
- can read ExploreFormDataRestApi
- can read ExplorePermalinkRestApi
- can view chart as table Dashboard
- can view query Dashboard
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]