Skip to content

Conversation

aaronskiba
Copy link
Contributor

Fixes (Issue exists downstream: portagenetwork#1006)

Changes proposed in this PR:

  • Include email confirmation status as an editable attribute on the /super_admin/users/:id path.
    Screenshot from 2025-07-04 09-53-54 Screenshot from 2025-07-04 09-53-47
    • The added logic includes special handling for superadmins. Specifically, it prevents the un-confirming of any already confirmed super admin email.
  • This added feature helps address an encountered issue (Investigate Users Not Receiving Confirmation Instructions Email portagenetwork/roadmap#1005) where some institutions were blocking emails from @portagenetwork.ca, and as a result, preventing users from receiving email confirmation instructions.

This change addresses an issue where some users reported not receiving the confirmation instructions email. Rather than having to manually update the users email confirmation status within the Rails console, this change allows users to confirm/unconfirm user emails within the app.
`spec/controllers/super_admin/users_controller_spec.rb`:
- Added test to prevent un-confirming of any super admin email within app
`app/controllers/super_admin/users_controller.rb`:
- Added [email protected]_super_admin? check to enable the aforementioned test to pass
- Also, updated a `patch` statement to `put`
Improves UX and reduces confusion when updating a user's
email confirmation status.

- Moved confirmation status inline with the "Email status:" heading
- Updated checkbox helper text to reflect current @user.confirmed? state:
  - Shows "(Check to confirm email)" if unconfirmed
  - Shows "(Uncheck to unconfirm email)" if confirmed
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