mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 00:11:22 +08:00
Fix project assignment activity & notification recipients [SCI-9863]
This commit is contained in:
parent
b1492ff0ce
commit
c599c939b8
2 changed files with 3 additions and 4 deletions
|
|
@ -35,10 +35,8 @@ module AccessPermissions
|
||||||
|
|
||||||
@user_assignment.update!(permitted_update_params)
|
@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,
|
log_activity(:change_user_role_on_project, { user_target: @user_assignment.user.id,
|
||||||
role: @user_assignment.user_role.name })
|
role: @user_assignment.user_role.name })
|
||||||
end
|
|
||||||
propagate_job(@user_assignment)
|
propagate_job(@user_assignment)
|
||||||
|
|
||||||
render :project_member
|
render :project_member
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,6 @@ class Recipients::AssignedRecipients
|
||||||
def recipients
|
def recipients
|
||||||
activity = Activity.find(@params[:activity_id])
|
activity = Activity.find(@params[:activity_id])
|
||||||
User.where(id: activity.values.dig('message_items', 'user_target', 'id'))
|
User.where(id: activity.values.dig('message_items', 'user_target', 'id'))
|
||||||
|
.where.not(id: activity.owner_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue