summaryrefslogtreecommitdiff
path: root/lib/gitlab/pages/settings.rb
blob: 8650a80a85ec3310ea9b9d2f69f7c510371660fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

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

      def path
        if ::Gitlab::Runtime.web_server? && !::Gitlab::Runtime.test_suite?
          raise DiskAccessDenied
        end

        super
      end
    end
  end
end