Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/api/app/policies/appeal_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def show?
# 2. They did something was reported (a spam comment, etc...) and a moderator took a decision which favored the report
def create?
return false unless Flipper.enabled?(:content_moderation, user)
# a user can only create one appeal per decision
return false if record.decision.appeals.pluck(:appellant_id).any?(user.id)

# Prevent appealing a decision for reports with a deleted reportable, since this wouldn't have any effect anyway.
@report = record.decision.reports.first
Expand Down