Main Koha release repository https://koha-community.org
Find a file
Jonathan Druart 95d0a17e8b Bug 18403: Hide patron information if not part of the logged in user library group
This patchset adds a new feature that will allow libraries inside a
single Koha installation to restrict access to information of patrons
that

The group of libraries feature is introduced by bug 15707, see this bug for more
information.

Let's imagine that 2 groups G1 and G2 are defined and that they include 2 libraries
each G1a, G1b and G2c, G2d: logged in users attached to G1a will only see patron's
information from G1a and G1b.
To add more flexibility, a new user permission named 'view_borrower_infos_from_any_libraries'
will drive this behavior. If set, the patron will be able to see patron's information
of any libraries.

If the restriction is set, the logged in user will not be able to search, show, edit,
delete patron's information of patrons attached to groups of libraries outside his
own group.
In situations we need to refer to a patron, for holds and checkouts for instance,
and his information cannot be viewed, a text "A patron from library G1A" will be
displayed.

Considered unecessary or outside the scope of this bug report:
* The report module is not affected by this feature for obvious reasons
* The firstname and surname of guarantors, basket (acq) managers, patrons linked
to orders are still displayed.
* Log viewer: Can only be staff
* patron list: you cannot add patrons from another group of librairies, but can
see/delete from list (too much rewrite, or we can test for patron one by one?).
* "Patron card creator" tool is not impacted by this feature.
* Upload patron images is not impacted by this patch, should it be?
* Tools:
  - Upload patrons
  - Clean borrowers tool (This can can done easily updating Koha::Patrons->search
with Koha::Patrons->search_limited in search_upcoming_membership_expires and
search_patrons_to_anonymise but we will need to move GetBorrowersToExpunge to
Koha::Patrons first)
We can discuss these different points but will be other bug reports not to add
more complexity to this first patchset.

Test plan:
You will find a test plan in the following commit messages.
Start by creating different group of libraries and patrons with and without the
new permission. Open different browser sessions to ease the tests.
Note that all patches have to be applied to test the different test plans.

Technical notes:
For QAers (and others) a techical note will be added to the commit messages of this
patchset. I would recommend you to read them one by one to understand the different
steps of this development.

+ Special attention should be payed to the REST api changes
+ Should we restrict the logged in user to libraries from his group when
he wants to set his library (Home › Circulation › Set library)?

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-12 15:41:36 -03:00
acqui Bug 19993: use Modern::Perl in Acquisition perl scripts 2018-02-05 09:45:47 -03:00
admin Bug 16735: Migrate library search groups into the new hierarchical groups 2018-02-12 15:41:25 -03:00
api/v1 Bug 16213: (QA follow-up) Fix terminology 2018-01-30 14:21:28 -03:00
authorities Bug 20063: (bug 18811 follow-up) Allow hidden $9 subfields 2018-01-22 13:44:42 -03:00
basket Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
C4 Bug 16735: Remove use of get_categories 2018-02-12 15:41:25 -03:00
catalogue Bug 16735: Use libraries in all subgroups, not just immediate children 2018-02-12 15:41:26 -03:00
cataloguing Bug 19996: (QA follow-up) Remove commented use warnings; 2018-02-05 09:45:47 -03:00
circ Bug 16735: Remove use of get_categories 2018-02-12 15:41:25 -03:00
clubs Bug 18632: Remove 'CGI::param called in list context' warnings 2017-05-28 22:25:22 -04:00
course_reserves Bug 19230: Preventing warn when deleting course 2018-01-30 14:18:21 -03:00
debian Bug 12904: Apache configuration 2018-02-08 14:53:23 -03:00
docs Bug 7143: Fix typo developper vs developer 2018-02-07 11:39:58 -03:00
errors Bug 19998: use Modern::Perl in error perl scripts 2018-02-05 09:45:48 -03:00
etc Bug 12904: Add mod_expire to etc/koha-httpd.conf 2018-02-08 14:53:23 -03:00
ill Bug 7317: Display all the libraries, not only one 2017-11-09 13:31:10 -03:00
installer Bug 18403: Hide patron information if not part of the logged in user library group 2018-02-12 15:41:36 -03:00
Koha Bug 16735: DBIC Schema files 2018-02-12 15:41:36 -03:00
koha-tmpl Bug 18403: Hide patron information if not part of the logged in user library group 2018-02-12 15:41:36 -03:00
labels Bug 19999: use Modern::Perl in label scripts 2018-02-05 09:45:48 -03:00
members Bug 19801: Display messages on user details page as well as on check out page 2018-02-08 17:01:14 -03:00
misc Bug 19730: (follow-up bug 17196) Use biblio_metadata.timestamp in export_records.pl 2018-02-02 12:08:42 -03:00
offline_circ Bug 20018: use Modern::Perl in offline_circ scripts 2018-02-05 09:46:45 -03:00
opac Bug 16735: Use libraries in all subgroups, not just immediate children 2018-02-12 15:41:26 -03:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
patron_lists Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
patroncards Bug 20010: use Modern::Perl in Patroncards perl scripts 2018-02-05 09:46:44 -03:00
plugins Bug 20011: use Modern::Perl in plugins perl scripts 2018-02-05 09:46:44 -03:00
reports Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
reserve Bug 20013: use Modern::Perl in Reserve perl script 2018-02-05 09:46:44 -03:00
reviews Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl 2017-12-21 11:07:37 -03:00
rotating_collections Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
serials Bug 20015: use Modern::Perl in Serials perl script 2018-02-05 09:46:45 -03:00
services Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
suggestion Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
svc Bug 20016: use Modern::Perl in svc scripts 2018-02-05 09:46:45 -03:00
t Bug 16735: Use libraries in all subgroups, not just immediate children 2018-02-12 15:41:26 -03:00
tags Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
test Bug 9819 - 'stopwords'-related code removed 2015-12-30 15:49:35 +00:00
tmp/modified_authorities changing DO_NOT_REMOVE to README.txt 2007-10-21 19:14:41 -05:00
tools Bug 20098: Inventory tool: CVS export: fix itemlost column 2018-02-05 09:47:09 -03:00
virtualshelves Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
xt Bug 20020: use Modern::Perl in XT scripts 2018-02-05 09:47:09 -03:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap Update mailmap - Jonathan Druart 2017-06-21 12:42:19 -03:00
about.pl Bug 19542: (QA follow-up) Remove debug warn 2017-12-11 14:30:42 -03:00
changelanguage.pl Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
edithelp.pl Bug 16447: Remove occurrence of the borrow permission which does no longer exist 2016-05-05 21:28:14 +00:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
INSTALL Bug 17626: Remove existing install instructions and link to the wiki pages instead 2016-11-22 11:29:07 +00:00
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Koha.pm Bug 16735: DBRev 17.12.00.008 2018-02-12 15:41:36 -03:00
koha_perl_deps.pl Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
Makefile.PL Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config 2017-12-22 13:15:39 -03:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-05-26 11:45:31 -03:00
README.robots Bug 6411 add another example to README.robots 2011-07-05 14:48:05 +12:00
rewrite-config.PL Bug 17951: (follow-up) Make Makefile.PL handle template_cache_dir config 2017-12-22 13:15:39 -03:00

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo