Welcome to mirror list, hosted at ThFree Co, Russian Federation.

settings.rb « pages « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e3dbeee7b13893909fd865dffae52a2eeab0dc66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Gitlab
  module Pages
    class Settings < ::SimpleDelegator
      DiskAccessDenied = Class.new(StandardError)

      def path
        if ::Gitlab::Runtime.web_server? && ENV['GITLAB_PAGES_DENY_DISK_ACCESS'] == '1'
          begin
            raise DiskAccessDenied
          rescue DiskAccessDenied => ex
            ::Gitlab::ErrorTracking.track_exception(ex)
          end
        end

        super
      end
    end
  end
end