mod reports: enable reporting for members, add dmail reporting.
* Add ability to report dmails. * Enable reports for comments, forum posts, and dmails. * Allow Members to send reports. * Don't allow users to report the same thing twice.
This commit is contained in:
@@ -198,4 +198,8 @@ class Dmail < ApplicationRecord
|
||||
def visible_to?(user, key)
|
||||
owner_id == user.id || (user.is_moderator? && key == self.key)
|
||||
end
|
||||
|
||||
def reportable_by?(user)
|
||||
is_recipient? && !is_automated? && !from.is_moderator?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user