Post#is_approvable?: fix 'Approve' link appearing on approver's own uploads.
Fixes the 'Approve' link in the modqueue and in the quickmod bar being shown as available on the approver's own flagged uploads, even though they can't actually approve these posts.
This commit is contained in:
@@ -289,7 +289,7 @@ class Post < ApplicationRecord
|
||||
|
||||
module ApprovalMethods
|
||||
def is_approvable?(user = CurrentUser.user)
|
||||
!is_status_locked? && (is_pending? || is_flagged? || is_deleted?) && !approved_by?(user)
|
||||
!is_status_locked? && (is_pending? || is_flagged? || is_deleted?) && uploader != user && !approved_by?(user)
|
||||
end
|
||||
|
||||
def flag!(reason, options = {})
|
||||
|
||||
Reference in New Issue
Block a user