hughhhh commented on code in PR #19981:
URL: https://github.com/apache/superset/pull/19981#discussion_r885763269


##########
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:
   Since we are generating new keys for misses, i think it's fine to let the 
keys expire



-- 
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]

Reply via email to