vhogberg opened a new issue, #43300:
URL: https://github.com/apache/superset/issues/43300

   ### Bug description
   
   ### Bug description
   
   `UploadCommand` can create datasets from CSV/Excel/columnar file upload 
without setting `catalog`. This is inconsistent with `CreateDatasetCommand`, 
which explicitly defaults the catalog to `database.get_default_catalog()`. This 
can cause file uploads to result in a dataset which is not visible to the user 
in the dataset list.
   
   ### How to reproduce the bug
   
   1. Connect a catalog-supporting database (e.g. PostgreSQL) and enable
      **Allow file uploads to database**, permitting a schema such as `public`.
   2. Use a non-admin role that has `can_upload` on `Database` and schema 
access to a schema such as `public`
   3. As that user, upload a CSV into `public`.
   4. Open the **Datasets** list.
   
   #### Expected results
   
   The dataset created by the upload appears in the Datasets list, and charts 
built
   on it appear in the Charts list.
   
   #### Actual results
   
   The upload succeeds and the data is queryable in SQL Lab (ownership 
satisfies `raise_for_access`), but the dataset is absent from the Datasets 
list, and any chart built on it is absent from the Charts list. Admins see 
both, because they bypass the filter via `can_access_all_datasources()`. 
`get_dataset_access_filters()` matches on `schema_perm` only and ignores 
ownership.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   6.1.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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