fix(org): delegation follow-ups — operate-as button, real role, no personal actions while delegated - #120
Conversation
On your own profile's Groups tab, each group row gains an "Operate as" button (delegate into the group), deliberately separate from the row link which goes to the group's profile. The active group shows a disabled "Operating" state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The endorse delegation modal said "acting as an admin" regardless of the operator's actual role. operatorRole is now threaded from activeOrg.role (owner/admin/member). The ActingAsBar already used the variable role; the modal was the only hard-coded instance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
While delegated you could still give/revoke/accept/reject endorsements on your PERSONAL account, which writes to your personal repo while the chrome says you're the org — confusing and wrong. Personal management now requires !activeOrg; group management requires acting AS that group. Audited and fixed every instance of the pattern: - profile Endorsements tab: canManage = (owner && !activeOrg) || acting-as-this-group; personal endorsement lists hidden while delegated - /notifications: accept/reject controls hidden while delegated - /endorsements page: redirects to /home while delegated Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Three follow-ups to the merged org-delegation feature (#119).
1. "Operate as" action on the profile Groups tab
On your own profile's Groups tab, each group row gains an "Operate as" button that delegates into the group (
switchOrg→/home). It's deliberately separate from the row link, which still goes to the group's profile. The currently-active group shows a disabled "Operating" state.2. Operator's real role, not a hard-coded "admin"
The endorse delegation modal said "acting as an admin" regardless of the operator's actual role.
operatorRoleis now threaded fromactiveOrg.role(owner / admin / member); copy reads "acting as its <role>". TheActingAsBaralready used the variable role — the modal was the only hard-coded instance (audited).3. No personal endorsement actions while acting as a group
While delegated you could still give / revoke / accept / reject endorsements on your personal account, writing to your personal repo while the chrome says you're the org. That cross-identity action is now blocked everywhere it existed:
canManage = (owner && !activeOrg) || acting-as-this-group; personal endorsement lists hidden while delegated./homewhile delegated (it was already nav-hidden; this closes the direct-URL hole).Test plan
tsc --noEmitcleaneslint— 0 new warnings (changed files clean)vitest519/519 pass (added anorg-contextmock to the endorsements-page test)next buildcompiles🤖 Generated with Claude Code