Repository navigation
Add agreement management UI and improve markdown rendering - #291
Merged
Merged
Conversation
- Added View button alongside Edit button on agreements list - Fixed CSS margin collapsing for rendered markdown in preview pane - Fixed CSS margins for public agreement rendering endpoint 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
bokelley
force-pushed
the
bokelley/terms-of-service-1.1
branch
from
December 12, 2025 12:39
b6babbe to
bddc05c
Compare
3 tasks done
bokelley
added a commit
that referenced
this pull request
May 1, 2026
… + Pia (#291) (#3744) * feat(identity): admin link-existing + unlink credential (Phase 2b cont.) Three new admin operations on /api/admin/users/:userId/credentials: GET /credentials — list bindings for this user's identity POST /credentials — bind an EXISTING WorkOS user by id DELETE /credentials/:credentialId — unbind (creates fresh singleton identity) POST bypasses createUser entirely, which fixes the case Brian hit on Ahmed: WorkOS still had user_01KG39QAWFMHE22MVT3XB6289S alive at [email protected] (the April merge's delete-secondary call had silently failed), so createUser returned 400 "Could not create user." Workflow is now: find the existing WorkOS user id in the WorkOS Dashboard, paste into "Link existing WorkOS user." DELETE is the unbind half — non-destructive (WorkOS user stays alive). Closes the Pia escalation (#291: "I want to remove a linked email"). Refuses on the primary credential to keep the host signed-in. UI on /admin/people detail panel now shows the bound credentials list with per-row Remove buttons (non-primary only), plus a "+ Link existing WorkOS user" action alongside "+ Add sign-in email." Existing /linked-emails (create-and-bind) error handler now surfaces the real WorkOS error message instead of a generic "502 upstream" — including the 400-BadRequest-on-already-exists case — and points admins at the new "Link existing" tool. Closes #3719 (admin consolidate-existing path). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(identity): address Phase 2b cont security findings Security review caught three improvements (no blockers): M1 — silent consolidation foot-gun. POST /credentials would happily move all of a credential's app-state (org memberships, working-group memberships, certification work, community points) onto the host without distinguishing "fresh credential" from "real account being absorbed." Now refuses with 409 + consolidate_confirmation_required when cred has app-state, requiring {"consolidate": true} in the body to proceed. UI escalates the prompt and makes admin type CONSOLIDATE in caps to confirm. M2 — audit forensics. unbind_credential audit row now records acting_workos_user_id (the actual auth credential, separate from the post-id-swap canonical id) in details so admins with multiple bound credentials are distinguishable. Issue #3717 still tracks the broader audit-log overhaul; this is the local fix. L1 — unbind UI confirmation now requires typing the credential's email exactly, matching the strength of the link confirmation. Defends against admin accidentally removing the wrong credential. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(scan): drop raw err.message from admin credential error responses Semgrep flagged the (err as Error).message echo in the link/unlink error paths — defense-in-depth concern noted in the security review (L2). Removed; the full error is still logged via logger.error. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
What's New
The admin agreements interface now displays each agreement with explicit View and Edit buttons, making it easier to access and manage different versions. The markdown rendering CSS has been updated to properly handle spacing between headers and paragraphs, eliminating the collapsed margin issue.
Testing
All schema validation, example validation, unit tests, and TypeScript type checks pass.