diff --git a/app/controllers/access_permissions/projects_controller.rb b/app/controllers/access_permissions/projects_controller.rb index ba9c31435..50a4ce2e3 100644 --- a/app/controllers/access_permissions/projects_controller.rb +++ b/app/controllers/access_permissions/projects_controller.rb @@ -35,10 +35,8 @@ module AccessPermissions @user_assignment.update!(permitted_update_params) - unless current_user.id == @user_assignment.user.id - log_activity(:change_user_role_on_project, { user_target: @user_assignment.user.id, - role: @user_assignment.user_role.name }) - end + log_activity(:change_user_role_on_project, { user_target: @user_assignment.user.id, + role: @user_assignment.user_role.name }) propagate_job(@user_assignment) render :project_member diff --git a/app/notifications/recipients/assigned_recipients.rb b/app/notifications/recipients/assigned_recipients.rb index 54686cf1b..2a2f9ce2a 100644 --- a/app/notifications/recipients/assigned_recipients.rb +++ b/app/notifications/recipients/assigned_recipients.rb @@ -8,5 +8,6 @@ class Recipients::AssignedRecipients def recipients activity = Activity.find(@params[:activity_id]) User.where(id: activity.values.dig('message_items', 'user_target', 'id')) + .where.not(id: activity.owner_id) end end