feat: admin can add a team member to the impersonated organization#1743
Merged
Conversation
Adds an Add Team Member button to the impersonation bar, shown only when the impersonated organization plan includes team members (TEAM and above). The modal takes an email and role (USER/ADMIN) and directly adds an existing Postiz account to the organization with no approval needed, via a new superadmin-only POST /settings/team/add endpoint. Since team invitations are stateless JWT links, adding directly also covers the case of approving a previously sent invitation. Errors are returned for unknown emails, ambiguous multi-provider emails and existing members. Manually verified on the admin panel: adding an existing account succeeds, and a non-existing email fires an error toast. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Contribution-checker quality warning Heuristics that flagged:
If this is a genuine contribution, please add detail to your PR description and tighten the diff scope before reviewers look at it. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
giladresisi
added a commit
that referenced
this pull request
Jul 23, 2026
Resolves the impersonate.tsx and users.controller.ts conflicts with the Switch User (#1730) and Add Team Member (#1743) features that landed on main — both sides kept everywhere. Also drops the duplicate useToaster import that #1730 + #1743 left on main (same fix as #1764; the two deletions merge cleanly whichever lands first), so this branch builds against current main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull Bot
pushed a commit
to dubbypanda/postiz-app
that referenced
this pull request
Jul 23, 2026
PRs gitroomhq#1730 and gitroomhq#1743 each added the same useToaster import to impersonate.tsx next to different neighboring lines, so merging both into main kept both copies without a textual conflict. Turbopack rejects the duplicate identifier, breaking every frontend build of main since the gitroomhq#1743 merge. Verified pnpm run build:frontend passes with the duplicate removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Why
Support flow: while helping a user (already in a thread with them), an admin needs to attach an existing Postiz account to that user's organization without the invitation-email round trip and without approval from the added account. Since team invitations are stateless JWT links (nothing is stored in the DB), "approving" an already-sent invitation is the same operation as adding the member directly — so this also covers the case where the org owner already sent an invite that the user never completed.
What changed
pricing[tier].team_members— TEAM and above). Opens a modal with email + role (USER/ADMIN), mirroring the existing team invite form.POST /settings/team/add→OrganizationService.addTeamMemberByEmail, which gates on the plan, looks the email up across all auth providers, and returns clear errors for: no account with that email, multiple accounts sharing the email on different providers (refuses to guess rather than attach the wrong account), and already-a-member. The add itself reuses the existingaddUserToOrgpath.Manually verified on the admin panel: an existing account is added successfully and appears in the org's team, and a non-existing email fires an error toast.
Other information
feat/admin-activate-user(PR to come) also touchesimpersonate.tsx; whichever lands second will have a trivial merge conflict there.🤖 Generated with Claude Code