Prevent creators from voting on their own BURs

This commit is contained in:
BrokenEagle
2020-06-20 05:29:16 +00:00
parent fd6ba473a5
commit 11d0539ea1

View File

@@ -24,7 +24,7 @@ class ForumPostPolicy < ApplicationPolicy
end
def votable?
unbanned? && show? && record.bulk_update_request.present? && record.bulk_update_request.is_pending?
unbanned? && show? && record.bulk_update_request.present? && record.bulk_update_request.is_pending? && record.bulk_update_request.user_id != user.id
end
def reportable?