Conversation
The SSO group sync can finish a few seconds after the app loads the current user, so a first login shows no group-based rules or views until a refresh. Check the user's groups again 2s and 10s after the first page is shown, and recompute group-based rules and views when they change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On first login, Workplace and Concierge act as if the user has no groups until they refresh. The SSO group sync adds the user's PlaceOS groups a few seconds after the app first loads the current user, so group-based booking rules and views use an empty group list.
Jira: PPT-2811
Fix
/-redirect page does not count. IfUser.groupschanged, apply the new user and reload group permissions./unauthorisedbefore the sync finished, send them back to the default route when their groups change.user_group_namessignal that only changes when the set of groups changes. Group-based rules and views read it, so they update without a refresh:Checks
nx test: common, bookings, events, explore, catering, concierge and workplace pass.nx build: workplace and concierge pass.Recording
PPT-2811-user-group-sync.webm
This recording is from workplace in mock mode. A temporary mock change (not part of this PR) made
users/currentreturn onlystafffor the first 5.5 s. A local settings override made Desks and Parking require theengineeringgroup. Home shows without Desks and Parking. About 2 s later, both appear without a refresh.Changes made by Claude Opus 5.5 (1M context) in Claude Code.
🤖 Generated with Claude Code