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

   ### Bug description
   
   **Issue Summary**
   When querying a dataset with Row-Level Security (RLS) applied in SQL Lab, 
the results are correctly filtered. However, if I click "Create Chart" directly 
from SQL Lab (without saving the dataset/virtual dataset), the chart displays 
the entire unfiltered data, ignoring the RLS restrictions. Ideally, it should 
only show the filtered data returned in SQL Lab.
   We can clearly see that SQL Lab returns only 3 rows — as expected. However, 
on the chart screen, it displays 125 rows, which is incorrect and indicates 
that the RLS filter is not being applied.
   
   **Expected Behavior:**
   The chart should reflect only the filtered results returned by SQL Lab 
(i.e., RLS-applied data).
   
   **📷 Evidence:**
   **SQL Lab Data Records(RLS)**
   <img width="1590" alt="Image" 
src="https://github.com/user-attachments/assets/83057f64-7a5b-4aeb-a166-ac23a18747c4";
 />
   
   **Chart Screen Data Records**
   <img width="1199" alt="Image" 
src="https://github.com/user-attachments/assets/2cdf06fa-5fd2-45ce-a01f-70ea5e021aa3";
 />
   
   **Steps to Reproduce:**
   
   - Query a dataset with RLS in SQL Lab.
   - Verify that RLS filters are applied (returns limited rows).
   - Click "Create Chart" directly from SQL Lab.
   - Observe that the chart ignores RLS and shows all rows.
   
   **Notes:**
   This seems to be due to the chart being created from a raw SQL result, which 
doesn't preserve RLS constraints unless it's saved as a dataset or virtual 
dataset.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.10
   
   ### Node version
   
   16
   
   ### 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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to