Respect group membership in notification service

This commit is contained in:
Dmitriy Zaporozhets 2013-06-21 23:21:55 +03:00
parent 99eb96075d
commit 3208dad1e7

View file

@ -174,6 +174,10 @@ class NotificationService
tm = project.users_projects.find_by_user_id(user.id) tm = project.users_projects.find_by_user_id(user.id)
if !tm && project.group
tm = project.users_groups.find_by_user_id(user.id)
end
# reject users who globally disabled notification and has no membership # reject users who globally disabled notification and has no membership
next user.notification.disabled? unless tm next user.notification.disabled? unless tm