Skip to content

Add command to sync users with ConCat volunteers - #68

Open
travismolick wants to merge 3 commits into
mainfrom
feature/concat-user-sync
Open

travismolick wants to merge 3 commits into
mainfrom
feature/concat-user-sync

Conversation

@travismolick

Copy link
Copy Markdown
Contributor

Adds auth:sync-concat, an artisan command that syncs Tracker users with ConCat's volunteer list.

What it does

  • Creates Tracker users for ConCat volunteers who don't have one yet
  • Refreshes usernames and badge names for existing users
  • Promotes Attendees to Volunteer, and volunteers flagged isStaff in ConCat to Staff
  • Demotes Volunteer/Staff users missing from ConCat's volunteer list to Attendee
  • Never changes Banned, Lead, Manager, or Admin roles, and skips soft-deleted users

Real names are never copied from ConCat, to avoid storing more PII. New users get the existing "Unidentified " placeholder, and demoted users keep their current names.

Safety

  • Only previews changes by default; pass --apply to save them.
  • All changes are saved in one transaction and recorded in the activity log.
  • Refuses to run if ConCat returns no volunteers, since that would demote everyone.

Known limits

Testing

  • Feature tests cover the dry run, apply, role protection, demotion, deleted users, and the empty-list guard.

Running it

php artisan auth:sync-concat           # preview
php artisan auth:sync-concat --apply   # save

Requires the ConCat OAuth app to have the user:read, volunteer:read, and registration:read scopes. Back up the database before applying.

Adds auth:sync-concat, which pulls all volunteers from ConCat and:
- creates Tracker users for volunteers who don't have one yet
- refreshes usernames and badge names for existing users
- promotes Attendees to Volunteer, and Volunteers flagged as staff in
  ConCat to Staff (Banned, Lead, Manager, and Admin are never changed)
- reports Volunteer/Staff users missing from ConCat without changing them

Real names are never copied from ConCat; new users get the usual
placeholder name. The command only previews changes unless --apply is
passed.
Volunteer and Staff users who aren't in ConCat's volunteer list are now
demoted to Attendee when the sync is applied, instead of only being
reported. Names are left unchanged, and Lead, Manager, Admin, Banned,
and deleted users are never demoted.
Keeps every planned change as a filled-in user model in a collection,
so applying the plan is a single save loop and the preview reads the
changes straight from the models. Also refuses to run when ConCat
returns no volunteers, since that would demote every volunteer and
staff member.
@travismolick
travismolick requested a review from a team October 12, 2026 06:58
@travismolick travismolick added the enhancement New feature or request label Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant