Use for_issuable? instead of for_issuable_with_ability?
This commit is contained in:
parent
da841106a9
commit
c9d561b1c2
2 changed files with 2 additions and 2 deletions
|
@ -229,7 +229,7 @@ class Note < ActiveRecord::Base
|
|||
!for_personal_snippet?
|
||||
end
|
||||
|
||||
def for_issuable_with_ability?
|
||||
def for_issuable?
|
||||
for_issue? || for_merge_request?
|
||||
end
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ class TodoService
|
|||
end
|
||||
|
||||
def reject_users_without_access(users, parent, target)
|
||||
if target.is_a?(Note) && target.for_issuable_with_ability?
|
||||
if target.is_a?(Note) && target.for_issuable?
|
||||
target = target.noteable
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue