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

logout: reload user info after logout, instead of assuming null #4383

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Oct 9, 2023

Issue: AAH-2726

The UI doesn't really know about the community mode anonymous user, except from the API which pretends it's just another user.

But logout would still set UI user to null, going through the codepath that redirects to /login, which would go to github and log in again instead.
Reloading the user info instead of using null, in community mode, the user gets set to the anonymous user, with no redirects.

because the UI doesn't really know about the anonymous user, except from the API

so.. logout would set user to null, going through the codepath that redirects to /login, which would go to github and log in again
instead, reloading the info when in anonymous mode, the user gets set to the anonymous user, with no redirects

Issue: AAH-2726
@github-actions github-actions bot added backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) labels Oct 9, 2023
@himdel himdel added community comunity mode feature and removed backport-4.7 This PR should be backported to stable-4.7 (2.4) labels Oct 9, 2023
@himdel himdel merged commit ceba5a3 into ansible:master Oct 10, 2023
@himdel himdel deleted the logout-github branch October 10, 2023 13:22
@patchback
Copy link

patchback bot commented Oct 10, 2023

Backport to stable-4.8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.8/ceba5a3f5c9e20c5989cb7898572e028ba8f0f74/pr-4383

Backported as #4386

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Oct 10, 2023
because the UI doesn't really know about the anonymous user, except from the API

so.. logout would set user to null, going through the codepath that redirects to /login, which would go to github and log in again
instead, reloading the info when in anonymous mode, the user gets set to the anonymous user, with no redirects

Issue: AAH-2726
(cherry picked from commit ceba5a3)
@himdel himdel added the backport-4.7 This PR should be backported to stable-4.7 (2.4) label Oct 10, 2023
@patchback
Copy link

patchback bot commented Oct 10, 2023

Backport to stable-4.7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.7/ceba5a3f5c9e20c5989cb7898572e028ba8f0f74/pr-4383

Backported as #4387

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Oct 10, 2023
because the UI doesn't really know about the anonymous user, except from the API

so.. logout would set user to null, going through the codepath that redirects to /login, which would go to github and log in again
instead, reloading the info when in anonymous mode, the user gets set to the anonymous user, with no redirects

Issue: AAH-2726
(cherry picked from commit ceba5a3)
himdel added a commit that referenced this pull request Oct 10, 2023
… (#4387)

because the UI doesn't really know about the anonymous user, except from the API

so.. logout would set user to null, going through the codepath that redirects to /login, which would go to github and log in again
instead, reloading the info when in anonymous mode, the user gets set to the anonymous user, with no redirects

Issue: AAH-2726
(cherry picked from commit ceba5a3)

Co-authored-by: Martin Hradil <mhradil@redhat.com>
himdel added a commit that referenced this pull request Oct 10, 2023
… (#4386)

because the UI doesn't really know about the anonymous user, except from the API

so.. logout would set user to null, going through the codepath that redirects to /login, which would go to github and log in again
instead, reloading the info when in anonymous mode, the user gets set to the anonymous user, with no redirects

Issue: AAH-2726
(cherry picked from commit ceba5a3)

Co-authored-by: Martin Hradil <mhradil@redhat.com>
@github-actions github-actions bot added backported-4.8 This PR has been backported to stable-4.8 (2.4) backported-4.7 This PR has been backported to stable-4.7 (2.4) labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) backported-4.7 This PR has been backported to stable-4.7 (2.4) backported-4.8 This PR has been backported to stable-4.8 (2.4) community comunity mode feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant