debian-mirror-gitlab/lib/banzai/reference_parser/feature_flag_parser.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
379 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
module Banzai
module ReferenceParser
class FeatureFlagParser < BaseParser
self.reference_type = :feature_flag
def references_relation
Operations::FeatureFlag
end
private
def can_read_reference?(user, feature_flag, node)
can?(user, :read_feature_flag, feature_flag)
end
end
end
end