apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.99k stars 13.59k forks source link

feat(Digest): Add RLS at digest generation for Charts and Dashboards #30336

Closed geido closed 3 days ago

geido commented 1 week ago

SUMMARY

Digest generation for charts and dashboards wasn't considering RLS for users and guest users (via Embedded). This PR includes the RLS in the hash generation for the digest. The digest is included in cache keys and will be updated according to the RLS rules. Previously you could generate a screenshot and any RLS applied later won't be applied to follow-up screenshots as the same cache key was being reused.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N.A.

TESTING INSTRUCTIONS

  1. Generate a screenshot of a Dashboard
  2. Add RLS rules for the current user
  3. Generate the screenshot again
  4. The screenshot should present the Dashboard with RLS rules applied

ADDITIONAL INFORMATION

github-actions[bot] commented 3 days ago

Ephemeral environment shutdown and build artifacts deleted.