Fix admin user delete flow#79
Merged
brianclemens merged 1 commit intoresf:mainfrom Apr 21, 2026
Merged
Conversation
The Carbon 1.23 web-component modal has incomplete CSS (no visible-state rule for :host(bx-modal[open])), so the delete confirmation never rendered. Replace with a plain form and native confirm() to unblock delete without a Carbon upgrade. Drop the "cannot delete admin users" rule from the route: the self-delete guard already prevents the only real lockout risk, and blocking admin-on-admin deletion was surprising behavior for an admin UI. Add tests covering delete success, admin-delete regression, self-delete blocked, and not-found. Ignore CLAUDE.md and temp/ so assistant context and scratch work don't get committed.
There was a problem hiding this comment.
Pull request overview
This PR fixes the admin user deletion UX by removing reliance on a Carbon web-component modal that doesn’t render properly in the current version, and it simplifies server-side deletion rules by allowing admins to delete other admins (while still preventing self-deletion). It also adds automated coverage for the delete route and wires the new test into Bazel + CI.
Changes:
- Replace the broken Carbon modal delete confirmation with a plain POST form + native
confirm()prompt. - Remove the “cannot delete admin users” guard in the delete route, keeping the self-delete protection.
- Add Bazel/CI-wired tests covering delete success, admin-delete regression, self-delete blocked, and not-found.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
apollo/server/templates/admin_user.jinja |
Replaces modal-driven delete confirmation with a simple form submission + browser confirm. |
apollo/server/routes/admin_users.py |
Removes the admin-role deletion restriction while retaining the self-delete guard. |
apollo/tests/test_admin_users.py |
Adds route-level behavior tests for delete flows (success, admin target, self-delete, not-found). |
apollo/tests/BUILD.bazel |
Registers the new test as a Bazel py_test. |
.github/workflows/test.yaml |
Ensures the new Bazel test target runs in CI. |
.gitignore |
Ignores CLAUDE.md and temp/ to avoid accidental commits of assistant/scratch artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
brianclemens
approved these changes
Apr 21, 2026
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.
The Carbon 1.23 web-component modal has incomplete CSS (no visible-state rule for :host(bx-modal[open])), so the delete confirmation never rendered. Replace with a plain form and native confirm() to unblock delete without a Carbon upgrade.
Drop the "cannot delete admin users" rule from the route: the self-delete guard already prevents the only real lockout risk, and blocking admin-on-admin deletion was surprising behavior for an admin UI.
Add tests covering delete success, admin-delete regression, self-delete blocked, and not-found. Ignore CLAUDE.md and temp/ so assistant context and scratch work don't get committed.