modreports: fix reporting inaccessible dmails and forum posts.
* Fix it being possible to report dmails belonging to other users. * Fix it being possible to report forum posts in mod-only threads.
This commit is contained in:
@@ -189,7 +189,7 @@ class Dmail < ApplicationRecord
|
||||
end
|
||||
|
||||
def reportable_by?(user)
|
||||
is_recipient? && !is_automated? && !from.is_moderator?
|
||||
owner == user && is_recipient? && !is_automated? && !from.is_moderator?
|
||||
end
|
||||
|
||||
def dtext_shortlink(key: false, **options)
|
||||
|
||||
Reference in New Issue
Block a user