dmunozv04 opened a new pull request, #40769:
URL: https://github.com/apache/superset/pull/40769

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fixes #40768, where accessing a permalink to a private dashboard without 
being logged in would return an error instead of redirecting to the login page. 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: `{"error": "Error: You don't have access to this dashboard."}`
   After: redirect to login page
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   Enable RBAC, share a dashboard with a role.
   Share -> copy permalink
   Open that link on a private tab (or log out before)
   You should be redirected to the login page instead of getting Error 
`{"error": "Error: You don't have access to this dashboard."} `
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [X] Has associated issue: #40768
   - [ ] 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
   
   Copies functionality from #30380. I've set noqa: C901 to be able to pass 
listing while copying the section of code verbatim. 
   If wanted, this could be refactored into a helper function to reduce 
complexity


-- 
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