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

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   
   Currently there is an infinite redirect on the login page (when users are 
not logged in) that is triggered by an unfortunate sequence of changes:
   
   1. [#17597](https://github.com/apache/superset/pull/17597) added redirect to 
login when API request returns 401
   2. 
[#19051](https://github.com/apache/superset/pull/19051/files#diff-8e496bd140c9eb03feb8073a1b530f5e46cb013d35b0d1619ff0e95db8c8c7eeR211-R215)
 starts to call the `/api/v1/database` API to find out whether there are 
databases with file upload enabled, even when the menu is rendered on a page 
where users haven't logged in.
   
   While debugging, I also found out that users without admin access will also 
see an empty "Data" menu, so I fixed that as well. 
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   When logged in as non admin users:
   
   #### Before
   <img width="345" alt="Xnip2022-04-13_16-57-59" 
src="https://user-images.githubusercontent.com/335541/163288964-cbb810d9-9973-4ca6-8b20-ab49693aa6a5.png";>
   
   There is an empty `Data` menu item with no submenu.
   
   #### After
   
   <img width="322" alt="Xnip2022-04-13_16-57-21" 
src="https://user-images.githubusercontent.com/335541/163289000-e715303d-a978-4526-b75d-e39530cb1985.png";>
   
   
   The `Data` menu item is removed
   
   ### TESTING INSTRUCTIONS
   
   1. Logout and go to `<superset url>/login`. You may see a redirect if the 
login page isn't overritten.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] 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