gitlab-org--gitlab-foss/app/models/blob_viewer
2021-11-12 12:10:27 +00:00
..
audio.rb Add latest changes from gitlab-org/gitlab@master 2019-10-16 15:06:17 +00:00
auxiliary.rb
balsamiq.rb Add latest changes from gitlab-org/gitlab@master 2020-10-14 15:08:42 +00:00
base.rb
binary_stl.rb
cargo_toml.rb Add latest changes from gitlab-org/gitlab@master 2019-12-18 12:07:48 +00:00
cartfile.rb
changelog.rb
client_side.rb
composer_json.rb
contributing.rb
csv.rb Add latest changes from gitlab-org/gitlab@master 2021-07-08 00:17:29 +00:00
dependency_manager.rb Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
download.rb
empty.rb
gemfile.rb
gemspec.rb
gitlab_ci_yml.rb Add latest changes from gitlab-org/gitlab@master 2021-01-19 09:10:32 +00:00
go_mod.rb Add latest changes from gitlab-org/gitlab@master 2021-07-14 18:08:31 +00:00
godeps_json.rb
image.rb Add latest changes from gitlab-org/gitlab@master 2020-07-13 12:09:18 +00:00
license.rb
markup.rb Add latest changes from gitlab-org/gitlab@master 2021-07-05 09:07:37 +00:00
metrics_dashboard_yml.rb Add latest changes from gitlab-org/gitlab@master 2020-08-27 15:10:21 +00:00
notebook.rb Add latest changes from gitlab-org/gitlab@master 2020-07-13 12:09:18 +00:00
open_api.rb Add latest changes from gitlab-org/gitlab@master 2020-07-13 12:09:18 +00:00
package_json.rb Add latest changes from gitlab-org/gitlab@master 2021-11-12 12:10:27 +00:00
pdf.rb Add latest changes from gitlab-org/gitlab@master 2020-10-14 15:08:42 +00:00
podfile.rb
podspec.rb
podspec_json.rb
readme.rb
requirements_txt.rb
rich.rb Add latest changes from gitlab-org/gitlab@master 2020-07-13 12:09:18 +00:00
route_map.rb
server_side.rb
simple.rb
sketch.rb Add latest changes from gitlab-org/gitlab@master 2020-10-14 15:08:42 +00:00
static.rb
svg.rb Add latest changes from gitlab-org/gitlab@master 2020-07-13 12:09:18 +00:00
text.rb
text_stl.rb
video.rb Add latest changes from gitlab-org/gitlab@master 2019-10-16 15:06:17 +00:00
yarn_lock.rb

# frozen_string_literal: true

module BlobViewer
  class Readme < Base
    include Auxiliary
    include Static

    self.partial_name = 'readme'
    self.file_types = %i(readme)
    self.binary = false

    def visible_to?(current_user)
      can?(current_user, :read_wiki, project)
    end

    def render_error
      return if project.has_external_wiki? || (project.wiki_enabled? && project.wiki.has_home_page?)

      :no_wiki
    end
  end
end