phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 3 forks source link

Email notifications for user access through group links #564

Closed ksierks closed 5 months ago

ksierks commented 5 months ago

What does this PR do and why?

Implemented emails for notifying users and managers when a group has been invited/uninvited to/from a group/project. Closes #476.

Note: A manager is a member that has a role of owner or maintainer.

Screenshots or screen recordings

Access granted email being sent to a user: image Access granted email being sent to a manager: image Access revoked email being sent to a user: image Access revoked email being sent to a manager: image

How to set up and validate locally

  1. Install local mock email service, Mailhog.
  2. After setup, open a terminal and run ~/go/bin/MailHog.
  3. Run irida-next.
  4. Login to irida-next.
  5. Navigate to a group or project that the logged in user is a manager of. Alternatively, you could create a new group or project.
  6. Select the Members menu item, then Groups tab.
  7. Try inviting & uninviting a group.
  8. Open a browser and navigate to http://0.0.0.0:8025/. Check the mock email service for sent emails.

Note: Email previews are located at http://localhost:3000/rails/mailers/group_link_mailer.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

ChrisHuynh333 commented 5 months ago

This looks good to me and is working as described! I don't have anything to comment on/suggest, just a question: Should we also email managers of the group sending out/revoking access? Ie: Group 1 sends Group 2 an invite, Group 1 managers also receive an email?

github-actions[bot] commented 5 months ago

Simplecov Report

Covered Threshold
92.24% 90%