rusackas commented on code in PR #43499:
URL: https://github.com/apache/superset/pull/43499#discussion_r4254862097


##########
superset/commands/chart/utils.py:
##########
@@ -33,15 +33,22 @@
 def validate_chart_datasource_type(datasource_type: str) -> None:
     """Accept persistent chart sources with names and type-aware access 
policies.
 
-    SQL Lab queries are registered datasource types but are not persistent
-    chart sources; accepting all DatasourceDAO registrations would include 
them.
+    A raw SQL Lab ``query`` is a registered datasource type but not a
+    persistent chart source, so it's excluded here; accepting all
+    DatasourceDAO registrations would include it. A ``saved_query`` is
+    explicitly persisted and named by the user, so it's accepted alongside
+    ``table``/``semantic_view``.
     """
     if (
         datasource_type == DatasourceType.SEMANTIC_VIEW
         and not is_semantic_layers_enabled()
     ):
         raise ValidationError(SemanticLayersDisabledError.message)
-    if datasource_type not in (DatasourceType.TABLE, 
DatasourceType.SEMANTIC_VIEW):
+    if datasource_type not in (
+        DatasourceType.TABLE,
+        DatasourceType.SEMANTIC_VIEW,
+        DatasourceType.SAVEDQUERY,

Review Comment:
   @sadpandajoe good catch. Added a `type` property to `SavedQuery` returning 
`"saved_query"` (mirrors `Query.type`), so the guest RLS check no longer hits 
an `AttributeError`. Pushed in 509a43ba.



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