This is an automated email from the ASF dual-hosted git repository.

msyavuz pushed a commit to branch msyavuz/fix/multilayer-embedded
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 79e865ddfa1f44d76bf46c4094e6cf4d08f78dea
Author: Mehmet Salih Yavuz <[email protected]>
AuthorDate: Tue Jan 27 11:43:59 2026 +0300

    fix(embedded): dashboard context for multi layer charts in embedded
---
 superset/viz.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/superset/viz.py b/superset/viz.py
index c6c7cf699b..e87f006534 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -1625,6 +1625,16 @@ class DeckGLMultiLayer(BaseViz):
             form_data = slc.form_data
             form_data = self._apply_layer_filtering(form_data, layer_index)
 
+            # Preserve dashboard context from parent form for embedded 
dashboards
+            # This allows guest users to access datasources in embedded mode
+            if "dashboardId" in self.form_data:
+                form_data["dashboardId"] = self.form_data["dashboardId"]
+            # Preserve parent slice_id for permission checks
+            if "slice_id" in self.form_data:
+                form_data["parent_slice_id"] = self.form_data["slice_id"]
+                # Also preserve the individual layer's slice_id for proper 
association
+                form_data["slice_id"] = slc.id
+
             viz_type_name = form_data.get("viz_type")
             viz_class = viz_types.get(viz_type_name)
             if not viz_class:

Reply via email to