Repository navigation
Add command to sync users with ConCat volunteers - #68
Open
travismolick wants to merge 3 commits into
Open
travismolick wants to merge 3 commits into
travismolick wants to merge 3 commits into
Conversation
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.
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.
Adds
auth:sync-concat, an artisan command that syncs Tracker users with ConCat's volunteer list.What it does
isStaffin ConCat to StaffReal 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
--applyto save them.Known limits
isStaffonly comes from volunteer applications, so staff without one are demoted.Testing
Running it
Requires the ConCat OAuth app to have the
user:read,volunteer:read, andregistration:readscopes. Back up the database before applying.