sadpandajoe commented on code in PR #45342:
URL: https://github.com/apache/superset/pull/45342#discussion_r4290880184


##########
superset/commands/dataset/create.py:
##########
@@ -225,6 +225,7 @@ def validate(self) -> None:  # noqa: C901
                     sql=sql,
                     catalog=catalog,
                     schema=schema,
+                    allow_dataset_editorship=False,

Review Comment:
   Create still authorizes the SQL without the dataset's own `template_params`, 
while update, import and `/datasource/save/` now forward them. With template 
processing on, a user with dataset write but no table grants can submit `sql = 
"{{ t }}"` with `template_params = {"t": "SELECT secret FROM 
public.customer_pii"}`. The check renders the unresolved placeholder (no 
tables, so nothing to deny) and the dataset is created with them as its editor; 
later chart-data and explore requests render the stored params and are accepted 
on editorship. Should this call pass the parsed `template_params` (already read 
earlier in `validate`) into `raise_for_access`, like `_validate_sql_access` 
does?



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