Skip to content

Add admin bulk user changes upload#3601

Merged
bernardhanna merged 1 commit into
devfrom
feature/bulk-user-changes
Jul 1, 2026
Merged

Add admin bulk user changes upload#3601
bernardhanna merged 1 commit into
devfrom
feature/bulk-user-changes

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

Summary

  • Adds /admin/bulk-user-changes for super admins to upload the client Changes spreadsheet (same validate → preview → apply → report flow as bulk event upload).
  • Parses role add/remove, email change, and country sync rows; never creates missing users — not-found rows appear in the skipped summary.
  • Dynamically detects the header row on the Changes sheet (no hardcoded row 150); blank rows without email/action are ignored.

Test plan

  • Log in as super admin → Bulk upload → "Bulk user changes"
  • Upload C4EU_20240801_EUCodeWeek ALTEC Contacts_edited for website.xlsx (Changes tab)
  • Preview shows ~172 leading-teacher adds, ambassador removes, email changes; missing users listed as skipped
  • Apply on staging with a small test subset first
  • php artisan test tests/Unit/BulkUserChanges/

Notes

  • Role swaps (change ambassador to leading teacher) → manual_review for now
  • edu coordinator rows skip if that role is not in the DB

Made with Cursor

Super admins can upload the client Changes spreadsheet, review a row-by-row
plan (role add/remove, email update, country sync), and apply in one step.

- auto-detects the Changes sheet header row; skips blank rows (no hardcoded start row)
- never creates missing users; not-found rows are reported in the summary
- mirrors the bulk event upload validate → preview → apply → report flow

Co-authored-by: Cursor <cursoragent@cursor.com>
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