gitlab-org--gitlab-foss/app/models/blob_viewer
Mario de la Ossa d02059ddf3
BlobViewer::PackageJson - if private link to homepage
2017-12-18 23:18:23 -06:00
..
auxiliary.rb Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
balsamiq.rb Moved partial 2017-04-28 11:42:30 +01:00
base.rb Clean up some backend 2017-08-03 14:29:35 +02:00
binary_stl.rb Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
cartfile.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
changelog.rb Add auxiliary blob viewer for CHANGELOG 2017-05-17 18:00:13 +00:00
client_side.rb Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
composer_json.rb Fix external link to Composer website 2017-08-17 12:54:30 +07:00
contributing.rb Add auxiliary viewer for CONTRIBUTING 2017-05-16 15:51:22 -05:00
dependency_manager.rb Do not generate links for private NPM modules in blob view 2017-12-18 23:04:35 -06:00
download.rb Specify explicitly whether a blob viewer should be loaded asynchronously 2017-05-13 11:46:10 -05:00
empty.rb Empty blob viewer isn’t binary-only 2017-06-07 14:31:05 -05:00
gemfile.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
gemspec.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
gitlab_ci_yml.rb move `lib/ci/gitlab_ci_yaml_processor.rb` into `lib/gitlab/ci/yaml_processor.rb` 2017-09-12 22:32:02 +03:00
godeps_json.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
image.rb Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
license.rb Add auxiliary blob viewer for CHANGELOG 2017-05-17 18:00:13 +00:00
markup.rb Render plain README using Markup viewer so it is displayed below tree 2017-05-18 16:19:22 -05:00
notebook.rb Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
package_json.rb BlobViewer::PackageJson - if private link to homepage 2017-12-18 23:18:23 -06:00
pdf.rb Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
podfile.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
podspec.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
podspec_json.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
readme.rb Don't show auxiliary blob viewer for README when there is no wiki 2017-07-06 16:19:10 -05:00
requirements_txt.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00
rich.rb Add rich blob viewers 2017-04-27 12:23:26 -05:00
route_map.rb Allow blob viewer to support multiple filetypes 2017-05-13 11:46:10 -05:00
server_side.rb Clean up some backend 2017-08-03 14:29:35 +02:00
simple.rb
sketch.rb Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
static.rb Specify explicitly whether a blob viewer should be loaded asynchronously 2017-05-13 11:46:10 -05:00
svg.rb Set BlobViewer::Base.binary instead of .text 2017-04-27 12:23:26 -05:00
text.rb Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
text_stl.rb Explain how viewers are selected from RICH_VIEWERS 2017-04-27 12:23:27 -05:00
video.rb Display video blobs in-line like images 2017-04-28 09:38:02 -05:00
yarn_lock.rb Add auxiliary blob viewers to dependency files 2017-05-17 14:10:00 -05:00

readme.rb

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