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

UserMailer#permissions_change_notification receives incorrect user #2955

Closed
nicolasfranck opened this issue Jun 24, 2021 · 0 comments
Closed
Assignees
Labels
bug effort-small less than 1/2 day of dev time email notifications

Comments

@nicolasfranck
Copy link
Contributor

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

3.0.2

Expected behaviour:

The mail template that is sent to user whose permissions have been
changed should be addressed to that user, not to the user that changed
it.

Actual behaviour:

It addresses the user that changed it.

RolesController#update supplies the current_user as second argument to UserMailer.permissions_changed_notification, so @username = user.name becomes the name of the user that made the change.

Should be @username = role.user.name? And maybe rename the second argument to current_user to make
it clear what that argument is for.

nicolasfranck added a commit to DMPbelgium/roadmap that referenced this issue Jun 25, 2021
@briri briri added bug effort-small less than 1/2 day of dev time email notifications labels Jul 27, 2021
johnpinto1 pushed a commit that referenced this issue Oct 25, 2021
…orrect user

Changes:
 - Added an instance variable @recepient = @role.user to
permissions_change_notification() method in roles_controller and removed
instance variable @username and replaced @role.user.email by
@recepient.email.
 - Replaced username with recepientname = @recepient.name in permissions_change_notification.html.erb
briri added a commit that referenced this issue Oct 25, 2021
…ons_change_notification_receives_incorrect_user

Issue #2955 -  UserMailer#permissions_change_notification receives in…
@briri briri closed this as completed Nov 10, 2021
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this issue Feb 28, 2022
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this issue Jun 1, 2023
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this issue Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug effort-small less than 1/2 day of dev time email notifications
Projects
None yet
Development

No branches or pull requests

3 participants