Bug 38885

Summary: Hide "Access files" if no access_dir is set
Product: Koha Reporter: Magnus Enger <magnus>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Magnus Enger 2025-01-14 09:47:01 UTC
Since bug 11317 we can set access_dir in koha-conf.xml, and have files from one or more directories on the server shown in the staff client. 

But if no access_dir is set in koha_conf.xml the "Access files" tool is still shown in the Tools > "Additional tools" menu. If a staff user clicks on "Access files", this message is shown: 

Error: Files could not be found because the "access_dir" option was not set in "koha-conf.xml". Contact your system administrator to add this option.

There is no error if this feature is not really being used. 

The best option IMO would be to hide "Access files" if no access_dir is set. An alternative could be to change the "error" message, to just say something like "This feature has not been configured".