debian-mirror-gitlab/app/models/blob_viewer
2023-07-09 08:55:56 +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
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
cargo_toml.rb New upstream version 12.8.6 2020-03-13 15:44:24 +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 15.11.6+ds1 2023-06-20 00:43:36 +05:30
contributing.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
csv.rb New upstream version 14.1.7+ds1 2021-09-30 23:02:18 +05:30
dependency_manager.rb New upstream version 15.11.6+ds1 2023-06-20 00:43:36 +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 13.8.5+ds1 2021-03-08 18:12:59 +05:30
go_mod.rb New upstream version 14.1.7+ds1 2021-09-30 23:02:18 +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 13.2.1 2020-08-09 17:44:08 +05:30
license.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
markup.rb New upstream version 14.1.7+ds1 2021-09-30 23:02:18 +05:30
metrics_dashboard_yml.rb New upstream version 16.0.7+ds1 2023-07-09 08:55:56 +05:30
notebook.rb New upstream version 13.2.1 2020-08-09 17:44:08 +05:30
open_api.rb New upstream version 13.2.1 2020-08-09 17:44:08 +05:30
package_json.rb New upstream version 15.11.6+ds1 2023-06-20 00:43:36 +05:30
pdf.rb New upstream version 13.5.5 2021-01-03 14:25:43 +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 15.11.6+ds1 2023-06-20 00:43:36 +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 13.2.1 2020-08-09 17:44:08 +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 13.5.5 2021-01-03 14:25:43 +05:30
static.rb New upstream version 11.2.8+dfsg 2018-11-18 11:00:15 +05:30
svg.rb New upstream version 13.2.1 2020-08-09 17:44:08 +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