Commit 4b50f850 authored by Jarka Kadlecová's avatar Jarka Kadlecová

Use for_issuable? instead of for_issuable_with_ability?

parent ff89a77c
...@@ -237,7 +237,7 @@ class Note < ActiveRecord::Base ...@@ -237,7 +237,7 @@ class Note < ActiveRecord::Base
!for_personal_snippet? !for_personal_snippet?
end end
def for_issuable_with_ability? def for_issuable?
for_issue? || for_merge_request? for_issue? || for_merge_request?
end end
......
...@@ -341,7 +341,7 @@ class TodoService ...@@ -341,7 +341,7 @@ class TodoService
end end
def reject_users_without_access(users, parent, target) 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 target = target.noteable
end end
......
...@@ -57,8 +57,8 @@ module EE ...@@ -57,8 +57,8 @@ module EE
super.merge(banzai_context_params) super.merge(banzai_context_params)
end end
override :for_issuable_with_ability? override :for_issuable?
def for_issuable_with_ability? def for_issuable?
for_epic? || super for_epic? || super
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment