Skip to content

New accounts wait for your approval before they can sign in - #66

Merged
rrice-dev merged 1 commit into
mainfrom
approve-sign-ups
Oct 29, 2026
Merged

rrice-dev merged 1 commit into
mainfrom
approve-sign-ups

Conversation

@rrice-dev

Copy link
Copy Markdown
Owner

New accounts can't sign in until an admin approves them. Anyone can still fill in the sign-up form, but nothing past the login page works for them until you approve.

For you (the admin): Settings now has an Accounts waiting for approval section, which only admins see. Each waiting account has Approve and Decline. Declining deletes the waiting account, and it never works on an approved one.

For new users:

  • The sign-up page says the owner approves each new account.
  • After signing up, they see "Your account is waiting for approval".
  • If they try to log in before you approve them, they see the same message.

Existing accounts: the migration approves every account that already exists, so nobody is locked out, and the configured admin account is always approved.

Security detail: approval is checked only after a correct password. A wrong password gets the usual "Invalid email or password", so nobody can tell which emails are waiting, and wrong guesses still count toward the lockout.

Local development: approval is off there (appsettings.Development.json and docker compose set Registration__RequireApproval=false).

Tests: 7 new API tests and 6 new page tests, all written to fail first. 421 API tests and 93 Angular tests pass, and the production build is clean. One migration adds the IsApproved column and approves existing users.


Generated by Claude Code

Anyone can still fill in the sign-up form, but the new account can't log in
until an admin approves it. Admins approve or decline from a new "Accounts
waiting for approval" section in Settings (GET/POST/DELETE
/api/admin/users). Declining deletes the waiting account; approved accounts
can't be declined.

- AppUser.IsApproved; the migration approves every existing account.
- ApprovalSignInManager checks approval only after a correct password, so a
  wrong password says nothing about whether an account is waiting, and wrong
  guesses still count toward the lockout.
- The configured admin (Admin:Email) is approved along with the role.
- Off for local development (appsettings.Development.json, docker compose)
  with Registration:RequireApproval=false.
- Sign-up page says accounts need approval and shows "waiting for approval"
  after signing up; login says the same for a waiting account.

Tests: 7 API tests (AccountApprovalTests) and 6 page tests, written to fail
first; existing tests approve the users they create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBixe8vfgVXDMVRMicQbiC
@rrice-dev
rrice-dev merged commit 0f8bd55 into main Oct 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant