• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 4c391e0e-519a-40cb-8ad3-354445f4ce03

12 Aug 2025 08:47PM UTC coverage: 85.348% (-10.0%) from 95.335%
4c391e0e-519a-40cb-8ad3-354445f4ce03

push

circleci

web-flow
[#5143] Use access restriction note as Aeon ItemInfo1 if available (#5173)

With this commit, if a user visits a record with an access
restrictions note and presses the Reading Room Request
button, they will get to an Aeon form with the 'Restrictions'
field pre-filled with the restriction note.

If the record does not have an access restrictions note,
the field will be pre-filled with 'Reading Room Access Only',
as it has been previously.

Closes #5143

5493 of 6436 relevant lines covered (85.35%)

251.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/lib/orangelight/middleware/no_file_uploads.rb
1
# frozen_string_literal: true
2
module Orangelight
1✔
3
  module Middleware
1✔
4
    # This class is responsible for ensuring that users cannot upload temporary files
5
    # to the server as part of a multipart/form-data request.
6
    #
7
    # While these uploaded files are deleted immediately as part of the request cycle
8
    # and are not placed in a directory where they can do much harm, they can still
9
    # trip OIT's malicious files sensors and then they take the server off the network.
10
    #
11
    # Since we have no need for these files, we reject them.
12
    class NoFileUploads
1✔
13
      def initialize(app)
1✔
14
        @app = app
1✔
15
      end
16

17
      def call(env)
1✔
18
        env['rack.multipart.tempfile_factory'] = lambda { |_filename, _content_type|
286✔
19
          raise 'Sorry, the catalog does not support file uploads'
×
20
        }
21
        app.call env
286✔
22
      end
23

24
        private
1✔
25

26
          attr_reader :app
1✔
27
    end
28
  end
29
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc