diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/incoming_message.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 5ad645200..96ecc7d53 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -38,6 +38,7 @@ require 'zip/zip' require 'iconv' unless RUBY_VERSION >= '1.9' class IncomingMessage < ActiveRecord::Base + extend MessageProminence belongs_to :info_request validates_presence_of :info_request @@ -49,8 +50,7 @@ class IncomingMessage < ActiveRecord::Base belongs_to :raw_email - PROMINENCE_STATES = ['normal', 'hidden','requester_only'] - validates_inclusion_of :prominence, :in => PROMINENCE_STATES + has_prominence(prominence_states = ['normal', 'hidden','requester_only']) # See binary_mask_stuff function below. It just test for inclusion # in this hash, not the value of the right hand side. @@ -69,10 +69,6 @@ class IncomingMessage < ActiveRecord::Base self.info_request_events.detect{ |e| e.event_type == 'response' } end - def user_can_view?(user) - Ability.can_view_with_prominence?(self.prominence, self.info_request, user) - end - def all_can_view? self.prominence == 'normal' end |