debian-mirror-gitlab/app/models/blob_viewer
2019-12-21 20:55:43 +05:30
..
audio.rb New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
auxiliary.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
balsamiq.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
base.rb New upstream version 12.3.8 2019-12-04 20:38:33 +05:30
binary_stl.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
cartfile.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
changelog.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
client_side.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
composer_json.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
contributing.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
dependency_manager.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
download.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
empty.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
gemfile.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
gemspec.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
gitlab_ci_yml.rb New upstream version 11.7.5 2019-02-15 15:39:39 +05:30
godeps_json.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
image.rb New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
license.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
markup.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
notebook.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
package_json.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
pdf.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
podfile.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
podspec.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
podspec_json.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
readme.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
requirements_txt.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
rich.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
route_map.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
server_side.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
simple.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
sketch.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
static.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
svg.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
text.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
text_stl.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
video.rb New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
yarn_lock.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30

# 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