Fix #4525: Show mod report notices next to reported content.

This commit is contained in:
evazion
2021-01-15 19:54:21 -06:00
parent 37792bd5dd
commit b4530183f4
20 changed files with 153 additions and 57 deletions

View File

@@ -3,6 +3,10 @@ class ModerationReportPolicy < ApplicationPolicy
user.is_moderator?
end
def show?
user.is_moderator?
end
def create?
unbanned? && policy(record.model).reportable?
end