2018-10-06 19:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-26 07:16:43 -04:00
|
|
|
module Banzai
|
|
|
|
module ReferenceParser
|
|
|
|
class LabelParser < BaseParser
|
|
|
|
self.reference_type = :label
|
|
|
|
|
|
|
|
def references_relation
|
|
|
|
Label
|
|
|
|
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_label, ref_project)
|
|
|
|
end
|
2016-05-26 07:16:43 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|