Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VYMCA-115] Admin accounts for CSV import #264

Merged
merged 2 commits into from
Feb 10, 2021
Merged

[VYMCA-115] Admin accounts for CSV import #264

merged 2 commits into from
Feb 10, 2021

Conversation

hamrant
Copy link

@hamrant hamrant commented Feb 9, 2021

Related Issue/Ticket:

Some Y's are having issues with giving admin access to the staff members that exist in the CSV file.

Steps to reproduce:
- Run import
- Edit any imported user and assign a "virtual editor" role
- Run import one more time
- Check that user without a "virtual editor" role

Solution:

Add settings with the user's emails list that should be skipped during migration.

Steps to test:

  • Login as admin
  • Go to /admin/modules
  • Enable "Open Y Virtual YMCA Auth Custom" module
  • Go to /admin/openy/virtual-ymca/gc-auth-settings
  • Set "Custom provider" as default provider
  • Go to /admin/openy/virtual-ymca/gc-auth-settings/provider/custom
  • Check that you can see the new section Migration users exclude
  • Add any random email - valid and invalid
  • Check that validation works fine
  • Create test.csv file with content:
Member ID,Member First Name,Primary Member,Member Email,Package Name,Package Site
309302,Test,Yes,TEST@GMAIL.COM,OLY - Family - Staff,Oscar Lasko Branch
309303,Jon,No,JON@GMAIL.COM,OLY - Family - Staff,Oscar Lasko Branch
117892,Doe,Yes,Doe@GMAIL.COM,West Chester - SilverSneakers - S & PP,West Chester
91896,Mike,No,SUPERMIKE@GMAIL.COM,Kennett - Family - Full,Kennett Branch
  • Go to /admin/openy/openy-gc-auth/settings/provider/custom/upload-csv
  • Upload this CSV file and save
  • Go to /admin/structure/migrate/manage/gc_auth/migrations/gc_auth_custom_users/execute
  • Set Update checkbox
  • Run import
  • You should see "Processed 4 items (4 created, 0 updated, 0 failed, 0 ignored) - done with 'gc_auth_custom_users' " message
  • Go to /admin/people
  • Check that users from CSV file created
  • Remove "Mike 91896" user with SUPERMIKE@GMAIL.COM email (Cancel account -> Delete the account and its content.)
  • Go to /admin/openy/virtual-ymca/gc-auth-settings/provider/custom
  • Add SUPERMIKE@GMAIL.COM email to "Migration users exclude" and save
  • Go to /admin/structure/migrate/manage/gc_auth/migrations/gc_auth_custom_users/execute
  • Set Update checkbox
  • Run import
  • You should see "Processed 4 items (0 created, 3 updated, 0 failed, 1 ignored) - done with 'gc_auth_custom_users' " message
  • Go to /admin/people
  • Check that "Mike 91896" account not restored

@fivejars fivejars deleted a comment from anpolimus Feb 10, 2021
@fivejars fivejars deleted a comment from AnastasiiaPys Feb 10, 2021
@fivejars fivejars deleted a comment from fjbot Feb 10, 2021
@fivejars fivejars deleted a comment from fjbot Feb 10, 2021
@AnastasiiaPys
Copy link

Tested, all good)

@AnastasiiaPys AnastasiiaPys merged commit 2fadfb1 into 1.3 Feb 10, 2021
@hamrant hamrant deleted the VYMCA-115 branch October 11, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants