debian-mirror-gitlab/lib/gitlab/search/found_wiki_page.rb

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

26 lines
543 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
# - rendering by using data purely from Elasticsearch and does not trigger Gitaly calls.
# - allows policy check
module Gitlab
module Search
class FoundWikiPage < SimpleDelegator
attr_reader :wiki
def self.declarative_policy_class
'WikiPagePolicy'
end
# @param found_blob [Gitlab::Search::FoundBlob]
def initialize(found_blob)
super
@wiki = found_blob.project.wiki
end
def to_ability_name
'wiki_page'
end
end
end
end