Updated invitation flow#1078
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1078 +/- ##
============================================
- Coverage 89.05% 88.88% -0.18%
- Complexity 1875 1943 +68
============================================
Files 275 283 +8
Lines 9733 9753 +20
============================================
+ Hits 8668 8669 +1
- Misses 1065 1084 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
99aa7ed to
b68825c
Compare
b68825c to
3267acb
Compare
|
|
||
| $user->switchTeam($organization); | ||
|
|
||
| // Note: The refresh is necessary for currently unknown reasons. Do not remove it. |
There was a problem hiding this comment.
do we know why it is needed now?
There was a problem hiding this comment.
Do you mean the switchTeam or the refresh?
There was a problem hiding this comment.
The refresh. The comment just sounded like a leftover.
|
@korridor I did change it to a session state now after all because the Inertia URL handling gets flaky once I start messing with the URLs on the client side (Inertia has its own URL state, which overrides it again). We can revisit this when we eventually migrate to a SPA and have full URL control there. E2E tests are in place so it should be an easy migration after the fact. I also changed the logged-out redirect and added an Auth check there for the case detection. I think this is cleaner than messing with the middleware behaviour and I don't really see a reason why there shouldn't be an Auth check in this controller especially when we just use it for the determining the redirect. Arguably, the UX path for "A different user is logged in and accepts the invite" is a bit confusing because they get a message that they accepted an invite to an organization but the logged in user cannot actually see the org (because the invite was accepted for a different user). It is probably an edge case tho. |
What does this PR do?
Checklist (DO NOT REMOVE)