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: OPTIC-1472: Next parameter isn't being set on /user/login after failed auth #6813

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mcanu
Copy link
Contributor

@mcanu mcanu commented Dec 19, 2024

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

Users weren't redirected properly to /user/login when logged out and trying to access an authed page.
This caused the next= parameter to be lost, losing proper redirection after login/signup.

What does this fix?

Unauthed users trying to visit an authed page get properly redirected after login

What is the current behavior?

Users are always redirected to projects page.

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

Authentication

signup.lso.mov
login.lso.mov

@github-actions github-actions bot added the fix label Dec 19, 2024
Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 077378a
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/6764917d50b55e0008a979f3

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 077378a
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/6764917da1617a0008abd318

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.78%. Comparing base (ea7294a) to head (077378a).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
label_studio/users/views.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6813   +/-   ##
========================================
  Coverage    76.78%   76.78%           
========================================
  Files          171      171           
  Lines        14023    14024    +1     
========================================
+ Hits         10767    10768    +1     
  Misses        3256     3256           
Flag Coverage Δ
pytests 76.78% <75.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant