department-of-veterans-affairs / diffusion-marketplace

Diffusion Marketplace source code
https://marketplace.va.gov
7 stars 10 forks source link

dm-5157 user bio management #1093

Closed PhilipDeFraties closed 3 weeks ago

PhilipDeFraties commented 1 month ago

JIRA issue link

https://agile6.atlassian.net/browse/DM-5157

Description - what does this code do?

creates migration to add :granted_public_bio to users table with index and default value of false

adds :granted_public_bio to admin/users index, show, and edit views

Testing done - how did you test it/steps on how can another person can test it

  1. run the migration
  2. as an admin go to the edit page for a user and check the "Granted public bio" checkbox
  3. verify the change persists and reflects for the "Granted public bio" row on the user's (admin) show page.
  4. verify the change is reflected for the user under the "Granted public bio" column in the users (admin) index view
  5. in the rails console verify the user record is returned when you run Rails.cache.read("users_with_public_bio")
  6. repeat 1-5 for another user and verify both users now appear in the cache
  7. uncheck the "Granted public bio" box for one of those users, verify the user record no longer appears in the cache