sakshipatil-hue opened a new pull request, #44256:
URL: https://github.com/apache/superset/pull/44256

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   
   fix(dashboard): preserve dashboards with empty layouts in 
DashboardAccessFilter
   -->
   
   ### SUMMARY
   Fixes an issue in `DashboardAccessFilter` where dashboards with empty 
layouts (no associated charts/slices) were made invisible to non-admin users. 
Because dataset access checks were applied directly to outer-joined tables, the 
query inadvertently treated them as inner joins and dropped empty-layout rows. 
This change adds an `or_` clause checking `~Dashboard.slices.any()` so that 
empty dashboards correctly bypass dataset restrictions.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   - Before: Dashboards with zero charts were filtered out and hidden from 
non-admin users.
   - After: Dashboards with empty layouts are correctly preserved and displayed.
   
   ### TESTING INSTRUCTIONS
   1. Log in as a non-admin user with dashboard access permissions.
   2. Create a new dashboard without adding any charts (empty layout).
   3. Verify that the dashboard remains visible in the dashboard list.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ x ] Has associated issue: Fixes #44239
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing 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