@@ -314,7 +314,7 class MailHandler < ActionMailer::Base | |||||
314 | # Adds To and Cc as watchers of the given object if the sender has the |
|
314 | # Adds To and Cc as watchers of the given object if the sender has the | |
315 | # appropriate permission |
|
315 | # appropriate permission | |
316 | def add_watchers(obj) |
|
316 | def add_watchers(obj) | |
317 | if user.allowed_to?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project) |
|
317 | if handler_options[:no_permission_check] || user.allowed_to?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project) | |
318 | addresses = [email.to, email.cc].flatten.compact.uniq.collect {|a| a.strip.downcase} |
|
318 | addresses = [email.to, email.cc].flatten.compact.uniq.collect {|a| a.strip.downcase} | |
319 | unless addresses.empty? |
|
319 | unless addresses.empty? | |
320 | users = User.active.having_mail(addresses).to_a |
|
320 | users = User.active.having_mail(addresses).to_a |
General Comments 0
You need to be logged in to leave comments.
Login now