feat: expose My Organization user permissions claim in session for UI… - #2798
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe SDK exposes the current-organization permissions claim on ChangesOrganization permissions claim
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2798 +/- ##
=======================================
Coverage 87.98% 87.99%
=======================================
Files 80 80
Lines 11515 11516 +1
Branches 2386 2386
=======================================
+ Hits 10132 10133 +1
Misses 1338 1338
Partials 45 45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@EXAMPLES.md`:
- Around line 3722-3725: Define `InviteMemberButton` within the Server Component
example or add an application-specific import for it, ensuring the `canInvite`
conditional renders a valid, available element when readers copy the example.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4582668c-9e01-409f-91b5-4cc98232ca0d
📒 Files selected for processing (4)
EXAMPLES.mdsrc/server/user.test.tssrc/server/user.tssrc/types/index.ts
56a83d6 to
9d0e1be
Compare
📋 Changes
urn:auth0:my_org_current_user_permissionsclaim into the ID token containing the user's effectivemy_org:*permissions in their current organization.filterDefaultIdTokenClaimscontrols what lands insession.useranduseUser()urn:auth0:my_org_current_user_permissionstoDEFAULT_ID_TOKEN_CLAIMS, no consumer configuration required, same behaviour asorg_id"urn:auth0:my_org_current_user_permissions"?: string[]to theUsertype insrc/types/index.tsEXAMPLES.mdwith Server Component and Client Component usage patterns, and added the claim to the default claims list🎯 Testing
src/server/user.test.tscover: claim retained with populated array, claim retained with empty array, claim coexists with all standard claims, unrecognised custom claims still filteredSummary by CodeRabbit
New Features
Documentation