durgaprasadml opened a new pull request, #42479:
URL: https://github.com/apache/superset/pull/42479

   ### SUMMARY
   
   Fixes an authorization issue that prevents non-admin users from creating 
charts from SQL Lab.
   
   Previously, users with `database_access` and SQL Lab permissions but without 
`all_datasource_access` were denied access when clicking **Create chart**, 
resulting in a backend authorization error and a frontend navigation failure.
   
   This change updates the ownership check for SQL Lab query resources so that 
models using `user_id` (such as `Query` and `SavedQuery`) are recognized as 
owned by their creator during authorization.
   
   ### BEFORE/AFTER
   
   **Before**
   - Non-admin users receive a 403 error when clicking **Create chart**.
   - Explore fails to open because no valid dataset/form data is returned.
   
   **After**
   - Authorized SQL Lab users can successfully create charts from their own 
queries.
   - Existing RBAC checks for unauthorized users remain unchanged.
   
   ### TESTING INSTRUCTIONS
   
   1. Create a Gamma user with `sql_lab` and `database_access`.
   2. Run a query in SQL Lab.
   3. Click **Create chart**.
   4. Verify that Explore opens successfully.
   5. Verify that users without the required permissions are still denied 
access.
   
   ### ADDITIONAL INFORMATION
   
   Fixes #42389
   
   - [x] Has associated issue
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API


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