Files
danbooru/app/policies/post_approval_policy.rb
evazion acc4a21687 posts: allow admins to approve the same post twice.
This is so admins can overrule flags and always have the final say in whether a
post is approved, even in the event of coordinated or sockpuppet flagging.

Fixes #4980: Way to mark flags as invalid for admins
2022-06-05 15:51:58 -05:00

12 lines
182 B
Ruby

# frozen_string_literal: true
class PostApprovalPolicy < ApplicationPolicy
def create?
user.is_approver?
end
def can_bypass_approval_limits?
user.is_admin?
end
end