Skip to content

AUTH-001A: require verified email for role grants#107

Merged
daliu merged 1 commit into
mainfrom
codex/issue-98-verified-role-grants
Jul 12, 2026
Merged

AUTH-001A: require verified email for role grants#107
daliu merged 1 commit into
mainfrom
codex/issue-98-verified-role-grants

Conversation

@daliu

@daliu daliu commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • require Firebase Auth userRecord.emailVerified === true before member or admin promotion
  • enforce the same pure policy in the authenticated admin callable and each legacy bulk-sync item before any claim or profile write
  • preserve demotion, App Check/admin authorization, batch bounds, self-demotion protection, and bulk admin exclusion
  • return one bounded generic bulk failure so unverified and nonexistent targets are indistinguishable

Verification

  • roleGrantPolicy.test.js: 10/10 passed, including forged-field, no-write, mixed-batch, missing-target, demotion, and self-demotion cases
  • full Functions tests: 3 suites / 17 tests passed
  • full Functions lint: passed
  • Firestore Rules emulator suite: 4 suites / 97 tests passed
  • diagnostic frontend production build: passed
  • diff check: passed
  • independent final security re-review: approved with no residual findings

The unrelated frontend baseline still stops in App.test.jsx because TextEncoder is undefined; that pre-existing failure is claimed in #103 and this PR does not touch its files. The SPA-navigation script named in the shared working-tree instructions is not present on current main, so it could not be invoked from this isolated branch.

No production identity, provider, or configuration changes were made.

Closes #98

@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for luminous-fox-7c393f failed.

Name Link
🔨 Latest commit ece2b8e
🔍 Latest deploy log https://app.netlify.com/projects/luminous-fox-7c393f/deploys/6a53fff53ec0f40008cbaed5

@daliu daliu merged commit ce22c11 into main Jul 12, 2026
3 of 7 checks passed
@daliu daliu deleted the codex/issue-98-verified-role-grants branch July 12, 2026 21:00
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