eschutho commented on code in PR #19981:
URL: https://github.com/apache/superset/pull/19981#discussion_r883195235
##########
superset/explore/form_data/commands/delete.py:
##########
@@ -47,14 +49,15 @@ def run(self) -> bool:
key
)
if state:
- dataset_id = state["dataset_id"]
- chart_id = state["chart_id"]
- check_access(dataset_id, chart_id, actor)
+ datasource_id: int = state["datasource_id"]
+ chart_id: Optional[int] = state["chart_id"]
+ datasource_type = DatasourceType(state["datasource_type"])
+ check_access(datasource_id, chart_id, actor, datasource_type)
if state["owner"] != get_owner(actor):
raise TemporaryCacheAccessDeniedError()
tab_id = self._cmd_params.tab_id
contextual_key = cache_key(
- session.get("_id"), tab_id, dataset_id, chart_id
+ session.get("_id"), tab_id, datasource_id, chart_id,
datasource_type
Review Comment:
todo: I still need to write up something here for deleting old keys. Unless
it's ok that it just expires on it's own. The user will get a 404 though.
--
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]