Bug 11317: Add a way to access files from the intranet
authorRoch D'Amour <roch.damour@inlibro.com>
Tue, 17 Apr 2018 18:24:07 +0000 (14:24 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 May 2018 16:26:49 +0000 (13:26 -0300)
commit0f9ec1287539e61f4dd089131cf69cb90fb3f8e2
tree58fed43ea6f300657df4857056b191cfa01b6695
parent6d59eee2bae08799358a8ea4dc17d4dd861784c4
Bug 11317: Add a way to access files from the intranet

This squash contains all of these commits:
- Adds a page to access log files on the server from the intranet
- Update ID to allow for permalinking
- Rename config to "'accessdir' and fix qa
- Allows for multiple directories to be accessible
- Update the link under reports
- (Follow-up) Fixing merge error and cosmetic changes
- (Follow-up) Fix tab chars and move javascript to the footer
- (QA Follow-up) Fix datatable
- Make filename unicode-proof, renamed accessdir to access_dir and fix update

Test plans:
- Apply patch, update database
- Add to koha-conf:
<access_dir>/tmp/koha-public/one</access_dir>
<access_dir>/tmp/koha-public/two</access_dir>
<access_dir>/tmp/koha-public</access_dir>
- Create these directories ( mkdir /tmp/koha-public , etc...)
- Create these files:
echo "hello world!" > /tmp/koha-public/❤
echo "test" > /tmp/koha-public/one/samename.txt
echo "this is not the same" > /tmp/koha-public/two/samename.txt
- Login as Superadmin, go to tools > reports files
    - Click on ❤, make sure it's downloadable and readable
    - Click on both samename.txt, look inside and make sure the file is different
- Login as NON-superadmin. Go under tools, see no Report/Log under the third column
    - Go to add tools/access_file permission to user
    - See new entry under tools third column.
    - validate link is ok.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml
installer/data/mysql/atomicupdate/bz11317-add-permission-for-tools-access-file.sql [new file with mode: 0644]
installer/data/mysql/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
tools/access_files.pl [new file with mode: 0755]