diff options
author | 2011-10-13 23:00:41 +0200 | |
---|---|---|
committer | 2011-10-13 23:00:41 +0200 | |
commit | 28e657bddaf2bde1350c5b4d73e792c3eeeb7ede (patch) | |
tree | 1d1b89804c48a0dc2ce6a747bd13d48ae8112fd4 | |
parent | Use custom XML converter that ignores typographic entities (diff) | |
download | glsamaker-28e657bddaf2bde1350c5b4d73e792c3eeeb7ede.tar.gz glsamaker-28e657bddaf2bde1350c5b4d73e792c3eeeb7ede.tar.bz2 glsamaker-28e657bddaf2bde1350c5b4d73e792c3eeeb7ede.zip |
Be less chatty
-rw-r--r-- | lib/glsamaker/mail.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/glsamaker/mail.rb b/lib/glsamaker/mail.rb index 7d1a671..d85d690 100644 --- a/lib/glsamaker/mail.rb +++ b/lib/glsamaker/mail.rb @@ -16,6 +16,11 @@ module Glsamaker Rails.logger.info "Not sending email." return false end + + if glsa.restricted + Rails.logger.info "Not sending email, confidential item." + return false + end User.find(:all, :conditions => 'id > 0').each do |rcpt| next unless rcpt.can_access? glsa @@ -31,6 +36,11 @@ module Glsamaker Rails.logger.info "Not sending email." return false end + + if glsa.restricted + Rails.logger.info "Not sending email, confidential item." + return false + end User.find(:all, :conditions => 'id > 0').each do |rcpt| next unless rcpt.can_access? glsa @@ -50,6 +60,11 @@ module Glsamaker # Nothing to do if there's no submitter yet return if glsa.status == 'request' + if glsa.restricted + Rails.logger.info "Not sending email, confidential item." + return false + end + rcpt = glsa.submitter return unless rcpt.can_access? glsa return if rcpt == user @@ -65,6 +80,11 @@ module Glsamaker return false end + if glsa.restricted + Rails.logger.info "Not sending email, confidential item." + return false + end + rcpt = glsa.submitter return unless rcpt.can_access? glsa |