Conversation
Implements reversible admin account lifecycle, managed by admins: - Add isActive flag to User entity (migration) - AdminLifecycleService: deactivate (Cognito global sign-out + disable + isActive=false) and reactivate (Cognito enable + isActive=true), with a last-active-admin safeguard - Guarded /admins endpoints: list, deactivate, reactivate (covers self and other admins) - RolesGuard blocks deactivated users on every protected route immediately - Frontend: Manage Admins page and a self-deactivate action in Settings - Reactivated admins log in normally with their existing credentials - Backend tests for service, controller, and guard
The jest workflow's generated .env set only AWS bucket/region/keys, so any spec importing util/aws-exports without mocking it (the email service and controller specs) failed at module load via checkAuthSecrets(). Add dummy COGNITO_APP_CLIENT_ID and COGNITO_USER_POOL_ID so the full suite runs.
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.
ℹ️ Issue
Closes #319
📝 Description
✔️ Verification
Provide screenshots of any new components, styling changes, or pages.
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!