aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-08-14 11:29:55 +0100
committerLouise Crow <louise.crow@gmail.com>2013-09-16 12:41:44 +0100
commit0bb0c97831d22a8ad29fd4c4a9217327c77dfcfd (patch)
treed2296d42fe9693c29c0626e2947de1dca42bc7a5 /app/models
parent5f256f104f98ac0aba1234d0dadac4a1f9602e11 (diff)
Add new code and specs for hiding attachments.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 287120599..eea9c868e 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -73,6 +73,10 @@ class IncomingMessage < ActiveRecord::Base
Ability.can_view_with_prominence?(self.prominence, self.info_request, user)
end
+ def all_can_view?
+ self.prominence == 'normal'
+ end
+
def indexed_by_search?
self.prominence == 'normal'
end