Merge pull request #4527 from BrokenEagle/forum-post-voting
Prevent creators from voting on their own BURs
This commit is contained in:
@@ -24,7 +24,7 @@ class ForumPostPolicy < ApplicationPolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def votable?
|
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
|
end
|
||||||
|
|
||||||
def reportable?
|
def reportable?
|
||||||
|
|||||||
Reference in New Issue
Block a user