imad-hl opened a new pull request, #32289:
URL: https://github.com/apache/superset/pull/32289

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   # fix(security): fix RBAC access check for dashboards to bypass 
dataset-level checks
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   This PR addresses issue #31938 by fixing the RBAC access checks in the 
security manager. The changes:
   
   - Ensure that enabling `DASHBOARD_RBAC` and granting a role access to a 
dashboard will bypass the dataset-level access checks as expected.
   - Refactor the logic for clarity and maintainability.
   
   Before this fix, enabling `DASHBOARD_RBAC` did not bypass dataset-level 
checks when a user had access to a dashboard, resulting in incorrect access 
control behavior.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   BEFORE  :  The user, despite having the correct RBAC role, was incorrectly 
blocked by dataset-level checks.
   
![image](https://github.com/user-attachments/assets/ed99a93f-4b7e-46eb-ad0d-719e86a36376)
   AFTER:  The fix ensures that the user’s RBAC role correctly bypasses 
dataset-level access checks.
   
![image](https://github.com/user-attachments/assets/c4cfc263-521d-4ffd-aa49-51b7fbb0bb11)
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Enable the `DASHBOARD_RBAC` feature flag.
   2. Grant a role access to a dashboard.
   3. Verify that the user with the assigned role can access the related 
datasource or query without being blocked by dataset-level checks.
   4. Ensure that the logic works as expected both with and without the 
`DASHBOARD_RBAC` feature flag enabled.
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [X ] Has associated issue: #31938
   - [X ] Required feature flags: 'DASHBOARD_RBAC'
   - [ ] 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: notifications-unsubscr...@superset.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