2016-05-26 07:16:43 -04:00
|
|
|
module Banzai
|
|
|
|
module ReferenceParser
|
|
|
|
class MilestoneParser < BaseParser
|
|
|
|
self.reference_type = :milestone
|
|
|
|
|
|
|
|
def references_relation
|
|
|
|
Milestone
|
|
|
|
end
|
2016-11-01 16:18:51 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2017-06-08 12:56:39 -04:00
|
|
|
def can_read_reference?(user, ref_project, node)
|
2016-11-01 16:18:51 -04:00
|
|
|
can?(user, :read_milestone, ref_project)
|
|
|
|
end
|
2016-05-26 07:16:43 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|