Koha/installer/data/mysql
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
..
atomicupdate Bug 18403: Hide patron information if not part of the logged in user library group 2018-02-12 15:41:36 -03:00
de-DE Bug 17682: Replace 2 occurrences in de-DE and nb-NO 2018-01-19 15:50:30 -03:00
en Bug 16735: Clean up sample data 2018-02-12 15:41:25 -03:00
es-ES Bug 16735: Clean up sample data 2018-02-12 15:41:25 -03:00
fr-CA Bug 18915: Add CHECKOUT_NOTE notice template for other languages 2018-01-15 13:42:33 -03:00
fr-FR Bug 18915: Add CHECKOUT_NOTE notice template for other languages 2018-01-15 13:42:33 -03:00
it-IT Bug 18915: Add CHECKOUT_NOTE notice template for other languages 2018-01-15 13:42:33 -03:00
mandatory Bug 17518: Displayed language name for Czech is wrong 2016-11-02 11:00:35 +00:00
nb-NO Bug 16735: Clean up sample data 2018-02-12 15:41:25 -03:00
pl-PL Bug 16735: Clean up sample data 2018-02-12 15:41:25 -03:00
ru-RU Bug 16735: Clean up sample data 2018-02-12 15:41:25 -03:00
uk-UA Bug 19973: Fix SQL syntax error in uk-UA/mandatory/sample_notices.sql 2018-01-15 13:46:08 -03:00
account_offset_types.sql Bug 12768: (QA follow-up) Use specific account offset types for Processing Fee and Lost Item 2017-10-23 12:36:12 -03:00
audio_alerts.sql
backfill_statistics.pl Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17135: [QA Follow-up] Changes as to reporting 2016-09-16 10:47:03 +00:00
kohastructure.sql Bug 16735: DBRev 17.12.00.008 2018-02-12 15:41:36 -03:00
labels_upgrade.pl
patroncards_upgrade.pl
sysprefs.sql Bug 19831: Turn on EnhancedMessagingPreferences by default for new installations 2018-01-22 13:47:14 -03:00
update22to30.pl
updatedatabase.pl Bug 16735: DBRev 17.12.00.008 2018-02-12 15:41:36 -03:00
userflags.sql Bug 7317: Add SQL templates & sysprefs. 2017-11-09 11:26:56 -03:00
userpermissions.sql Bug 18403: Hide patron information if not part of the logged in user library group 2018-02-12 15:41:36 -03:00