Restricting OPAC file viewer access to logged in authenticated users
Channel: l2c2technologies
Date: 08/05/2022

The ability to upload a file into any MARC21 field in Koha has been around for several years. A typical use of this functionality is to upload (and then later make available for display / download via the OPAC) a file into MARC21 sub-field 856$u which traditionally caters to URLs linked to a bibliographic record. The actual functionality of this retrieval of uploaded file and its display is handled by a file named opac-retrieve-file.pl. As on date, the file does not require user authentication to display the uploaded file when the link stored in 856$u is clicked. 

This is a demonstration of adding user authentication and login enhancement to the file so that while the entire bibliographic metadata is open and accessible, the actual uploaded file is available only to the library's members who have a valid OPAC userid and password.

Written at the request from Archana Sahu, Librarian, National Law University, Odisha.