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
Generate a screenshot of a Dashboard
Add RLS rules for the current user
Generate the screenshot again
The screenshot should present the Dashboard with RLS rules applied
ADDITIONAL INFORMATION
[ ] Has associated issue:
[ ] Required feature flags:
[ ] Changes UI
[ ] Includes DB Migration (follow approval process in SIP-59)
[ ] Migration is atomic, supports rollback & is backwards-compatible
[ ] Confirm DB migration upgrade and downgrade tested
[ ] Runtime estimates and downtime expectations provided
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
ADDITIONAL INFORMATION