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
1 changed files with 4 additions and 0 deletions

View File

@ -174,6 +174,10 @@ class NotificationService
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
next user.notification.disabled? unless tm