debian-mirror-gitlab/app/models/blob_viewer
2018-03-17 18:26:18 +05:30
..
auxiliary.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
balsamiq.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
base.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
binary_stl.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
cartfile.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
changelog.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
client_side.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
composer_json.rb New upstream version 10.5.5+dfsg 2018-03-17 18:26:18 +05:30
contributing.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
dependency_manager.rb New upstream version 10.5.5+dfsg 2018-03-17 18:26:18 +05:30
download.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
empty.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
gemfile.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
gemspec.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
gitlab_ci_yml.rb New upstream version 10.5.5+dfsg 2018-03-17 18:26:18 +05:30
godeps_json.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
image.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
license.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
markup.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
notebook.rb New upstream version 10.5.5+dfsg 2018-03-17 18:26:18 +05:30
package_json.rb New upstream version 10.5.5+dfsg 2018-03-17 18:26:18 +05:30
pdf.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
podfile.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
podspec.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
podspec_json.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
readme.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
requirements_txt.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
rich.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
route_map.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
server_side.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
simple.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
sketch.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
static.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
svg.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
text.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30
text_stl.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
video.rb New upstream version 9.2.10+dfsg 2017-08-17 22:00:37 +05:30
yarn_lock.rb New upstream version 9.5.4+dfsg 2017-09-10 17:25:29 +05:30

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