Skip to content

Conversation

aaronskiba
Copy link
Contributor

@aaronskiba aaronskiba commented Apr 14, 2025

NOTE: This PR should not be merged or tested until the app re-implements email confirmation via Devise's :confirmable module.

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-04-14 15-06-35
    • 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`
Copy link

</tr>
1 Error
🚫

Please include a CHANGELOG entry.

You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).
1 Warning
⚠️ There are code changes, but no corresponding tests. Please include tests if this PR introduces any modifications in behavior. \n
Ignore this warning if the PR ONLY contains translation.io synced updates.

Generated by 🚫 Danger

@aaronskiba
Copy link
Contributor Author

Closing this in favour of #3535

@aaronskiba aaronskiba closed this Jul 4, 2025
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