Skip to content

[comp] Production Deploy#3291

Merged
tofikwest merged 3 commits into
releasefrom
main
Jun 26, 2026
Merged

[comp] Production Deploy#3291
tofikwest merged 3 commits into
releasefrom
main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Fixes role upgrades for existing active members by merging invited roles into their current roles on invite/accept, so promotions take effect and users no longer hit "Access Denied". Removes redundant invites/emails for already-active members and adds shared role helpers with tests.

  • Bug Fixes
    • API: PeopleInviteService now unions invited roles into existing roles for active members; skips invitation/email; removes the existing-member invite path.
    • App: accept-invitation merges invited roles for active members; deactivated members are reactivated with invited roles.
    • Shared: added normalizeRoleString and mergeRoleStrings (with tests) to sort/de-dupe role strings.
    • Tests: coverage for promote/no-op/union cases to prevent silent failures on promotion.

Written for commit 86e4354. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 3 commits June 26, 2026 13:30
When an admin added or invited someone who was already an ACTIVE member of
the org, their role was never updated — the role write was gated behind the
`deactivated` branch in three places. So promoting an existing employee
(portal-only, no `app:read`) to admin silently failed: accepting the invite
marked it accepted but left the role as `employee`, and the user landed on
`/no-access` ("Access Denied").

Fix: when the invitee is an existing active member, union the invited roles
into their current roles (sorted, de-duped) so the new roles take effect and
no existing role is ever stripped.

- accept-invitation.ts: active members now merge invited roles (deactivated
  members keep the existing reactivate-and-replace behavior).
- people-invite.service.ts: `inviteWithCheck` and `addEmployeeWithoutInvite`
  upgrade an active member's role in place. For an already-active member there
  is nothing to "invite", so the redundant invitation + email are dropped and
  the role is updated directly (removes `sendInvitationEmailToExistingMember`).
- Shared role helpers (`normalizeRoleString`, `mergeRoleStrings`) added to
  apps/app `lib/permissions.ts`; equivalent private helpers in the API service.

Tests: API service specs for active-member promote / no-op / employee-path
union; app unit tests for the role-merge helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DsGo9DPoaKf7npxMhY2tkz
…-active-member

fix(people): upgrade an existing active member's role on invite/accept
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Jun 26, 2026 2:18pm
comp-framework-editor (staging) Ready Ready Preview, Comment Jun 26, 2026 2:18pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Jun 26, 2026 2:18pm

Request Review

@tofikwest tofikwest merged commit 097364b into release Jun 26, 2026
12 checks passed
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.92.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants