Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Redirect to full url on 401 #19357

Merged
merged 6 commits into from
Apr 15, 2022
Merged

fix: Redirect to full url on 401 #19357

merged 6 commits into from
Apr 15, 2022

Conversation

geido
Copy link
Member

@geido geido commented Mar 24, 2022

SUMMARY

Redirects to full url when a 401 occurs. This is to support the integration of Superset in third-party apps.

TESTING INSTRUCTIONS

  1. Clear your cookies
  2. Trigger any API request
  3. Make sure you are redirected to the login page and the next query param is filled with the full URL, host included

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
  • Introduces new feature or API
  • Removes existing feature or API

@geido geido marked this pull request as ready for review April 7, 2022 14:29
@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #19357 (2d65949) into master (32a9265) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #19357   +/-   ##
=======================================
  Coverage   66.50%   66.51%           
=======================================
  Files        1684     1686    +2     
  Lines       64570    64594   +24     
  Branches     6630     6636    +6     
=======================================
+ Hits        42941    42963   +22     
- Misses      19931    19932    +1     
- Partials     1698     1699    +1     
Flag Coverage Δ
javascript 51.17% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rset-ui-core/src/connection/SupersetClientClass.ts 100.00% <100.00%> (ø)
...ontrols/DndColumnSelectControl/DndColumnSelect.tsx 35.00% <0.00%> (-3.10%) ⬇️
...d/packages/superset-ui-core/src/models/Registry.ts 100.00% <0.00%> (ø)
...superset-ui-core/src/query/types/PostProcessing.ts 100.00% <0.00%> (ø)
...ui-chart-controls/src/operators/flattenOperator.ts 100.00% <0.00%> (ø)
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 74.39% <0.00%> (ø)
...set-ui-core/src/ui-overrides/UiOverrideRegistry.ts 100.00% <0.00%> (ø)
...kages/superset-ui-core/src/models/TypedRegistry.ts 100.00% <0.00%> (ø)
...c/views/CRUD/data/database/DatabaseModal/index.tsx 32.17% <0.00%> (+0.36%) ⬆️
...rc/dashboard/components/DashboardEmbedControls.tsx 9.43% <0.00%> (+1.27%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32a9265...2d65949. Read the comment docs.

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kgabryje kgabryje merged commit b8e5954 into apache:master Apr 15, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 15, 2022
* Redirect to full url

* Redirect to full url

* Update test

(cherry picked from commit b8e5954)
@sadpandajoe
Copy link
Contributor

🏷️ preset:2022.15

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* Redirect to full url

* Redirect to full url

* Update test
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset:2022.15 size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants