summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Elman <aelman@indeed.com>2014-08-27 11:20:28 -0500
committerAlex Elman <aelman@indeed.com>2014-11-05 10:28:59 -0600
commit383ac10ca5797818f7a61d04fbff0fbf54e87c0e (patch)
tree7e28f2fc8a03aa1856403ffb5e79767f79d7478c
parentf9814bf28831aeef746cfdc35431c8de45ff7677 (diff)
downloadgitlab-ce-383ac10ca5797818f7a61d04fbff0fbf54e87c0e.tar.gz
Issue-280 Send notifications when a note is added to a commit and author is a group member
This fixes a bug where commit authors weren't receiving email notifications for notes added to their commits and their membership was in the group but not the project. The fix is to look up membership via the team object which accounts for both project and group members.
-rw-r--r--app/models/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index f0ed7580b4c..996def0478a 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -251,8 +251,8 @@ class Note < ActiveRecord::Base
def commit_author
@commit_author ||=
- project.users.find_by(email: noteable.author_email) ||
- project.users.find_by(name: noteable.author_name)
+ project.team.users.find_by(email: noteable.author_email) ||
+ project.team.users.find_by(name: noteable.author_name)
rescue
nil
end