Skip to content

UserMailer#permissions_change_notification receives incorrect user #2955

@nicolasfranck

Description

@nicolasfranck

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions