Bug 18403 - Hide patron information if not part of the logged in user library group
Summary: Hide patron information if not part of the logged in user library group
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL: https://github.com/joubu/Koha/commits...
Whiteboard:
Keywords:
Depends on: 16735 19456 17829 18402
Blocks: 18789
  Show dependency treegraph
 
Reported: 2017-04-07 21:40 UTC by Jonathan Druart
Modified: 2017-12-05 17:36 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18403: Hide patron information if not part of the logged in user library group (6.20 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Library->library_group (3.40 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Library::Group->has_child (4.14 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Send logged_in_user to template from C4::Auth (2.77 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Patron->can_see_patron_info (1.80 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' (45.71 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos (50.19 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Adapt patron search (4.50 KB, patch)
2017-04-10 21:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Only display libraries from group in dropdown lists (12.89 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used (14.98 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory] (6.16 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsqueue] (2.44 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Batch patron modification tool (4.92 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: output_and_exit_if_error for circulation.pl (2.66 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed (3.96 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Refactor and add Koha::Patron->libraries_where_can_see_patrons (7.00 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add tests for Koha::Patrons (8.15 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Patron->can_see_patrons_from (1.95 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Patron modification requests (8.18 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Patron reviews (6.97 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Patron discharges (11.70 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Article requests (5.89 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Guarantors (2.70 KB, patch)
2017-04-10 21:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: REST API - patrons endpoint (2.41 KB, patch)
2017-04-10 21:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Deal with the DB user (7.74 KB, patch)
2017-04-18 16:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Fix patron creation (1.17 KB, patch)
2017-04-18 16:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18403: Hide patron information if not part of the logged in user library group (6.25 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Library->library_group (3.46 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Library::Group->has_child (4.20 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Send logged_in_user to template from C4::Auth (2.83 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Patron->can_see_patron_info (1.86 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' (45.78 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos (50.26 KB, patch)
2017-04-28 15:29 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Adapt patron search (4.56 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Only display libraries from group in dropdown lists (12.95 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used (15.03 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory] (6.21 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsqueue] (2.50 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Batch patron modification tool (4.98 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: output_and_exit_if_error for circulation.pl (2.72 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed (4.02 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Refactor and add Koha::Patron->libraries_where_can_see_patrons (7.05 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add tests for Koha::Patrons (8.21 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Add new method Koha::Patron->can_see_patrons_from (2.00 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Patron modification requests (8.24 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Patron reviews (7.03 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Patron discharges (11.76 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Article requests (6.96 KB, patch)
2017-04-28 15:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Guarantors (4.48 KB, patch)
2017-04-28 15:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: REST API - patrons endpoint (2.41 KB, patch)
2017-04-28 15:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Deal with the DB user (7.79 KB, patch)
2017-04-28 15:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 18403: Fix patron creation (1.23 KB, patch)
2017-04-28 15:31 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-04-07 21:40:52 UTC
Add the ability to hide patron record information from any other library (outside the group).
Comment 1 Jonathan Druart 2017-04-10 21:32:24 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2017-04-10 21:32:28 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2017-04-10 21:32:32 UTC
Created attachment 62012 [details] [review]
Bug 18403: Add new method Koha::Library::Group->has_child

This is more a follow-up for bug 15707. It could be moved on its own bug report
if necessary.

IMPORTANT NOTE: At the moment the feature only works for 1 level depth, see
bug 15707 comment 166+ for the discussion

It means that if we have:
 root_group
     + groupA
         + groupA1
             + groupA1_library2
         + groupA_library1
         + groupA2
     + groupB
         + groupB_library1
groupA1_library2 is not considered a child of groupA1.
Note that this can change.

Test plan:
  prove t/db_dependent/LibraryGroups.t
should return green
Comment 4 Jonathan Druart 2017-04-10 21:32:35 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2017-04-10 21:32:39 UTC
Created attachment 62014 [details] [review]
Bug 18403: Add new method Koha::Patron->can_see_patron_info

Technical note:
This is the method that will be called on the logged_in_user variable sent to
the template. Moreover we will check that the logged in user can access patron'
information when access to members/* and some circulation scripts will be done.
Comment 6 Jonathan Druart 2017-04-10 21:32:44 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2017-04-10 21:32:50 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2017-04-10 21:32:54 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2017-04-10 21:33:03 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2017-04-10 21:33:08 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2017-04-10 21:33:13 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2017-04-10 21:33:17 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2017-04-10 21:33:20 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2017-04-10 21:33:24 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2017-04-10 21:33:27 UTC Comment hidden (obsolete)
Comment 16 Jonathan Druart 2017-04-10 21:33:31 UTC Comment hidden (obsolete)
Comment 17 Jonathan Druart 2017-04-10 21:33:34 UTC Comment hidden (obsolete)
Comment 18 Jonathan Druart 2017-04-10 21:33:38 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2017-04-10 21:33:42 UTC Comment hidden (obsolete)
Comment 20 Jonathan Druart 2017-04-10 21:33:46 UTC Comment hidden (obsolete)
Comment 21 Jonathan Druart 2017-04-10 21:33:50 UTC Comment hidden (obsolete)
Comment 22 Jonathan Druart 2017-04-10 21:33:54 UTC Comment hidden (obsolete)
Comment 23 Jonathan Druart 2017-04-10 21:33:58 UTC Comment hidden (obsolete)
Comment 24 Jonathan Druart 2017-04-10 21:34:02 UTC Comment hidden (obsolete)
Comment 25 Jonathan Druart 2017-04-10 21:37:00 UTC
There are too many dependencies on this one, please see the following remote branch for the whole stack:
https://github.com/joubu/Koha/commits/bug_18403
Comment 26 Jonathan Druart 2017-04-18 16:15:02 UTC Comment hidden (obsolete)
Comment 27 Jonathan Druart 2017-04-18 16:15:08 UTC Comment hidden (obsolete)
Comment 28 Martin Renvoize 2017-04-26 10:27:37 UTC
We're walking through testing this... as it's such a big piece we've split out the testing results into a shared spreadsheet available here:

https://docs.google.com/spreadsheets/d/11NVVHFDJavGFhnARYozmdR-FVdKWxDEjavJAZRtB0Ww/edit?usp=sharing
Comment 29 Martin Renvoize 2017-04-28 15:29:35 UTC Comment hidden (obsolete)
Comment 30 Martin Renvoize 2017-04-28 15:29:39 UTC Comment hidden (obsolete)
Comment 31 Martin Renvoize 2017-04-28 15:29:43 UTC Comment hidden (obsolete)
Comment 32 Martin Renvoize 2017-04-28 15:29:46 UTC Comment hidden (obsolete)
Comment 33 Martin Renvoize 2017-04-28 15:29:50 UTC Comment hidden (obsolete)
Comment 34 Martin Renvoize 2017-04-28 15:29:54 UTC Comment hidden (obsolete)
Comment 35 Martin Renvoize 2017-04-28 15:29:58 UTC Comment hidden (obsolete)
Comment 36 Martin Renvoize 2017-04-28 15:30:02 UTC Comment hidden (obsolete)
Comment 37 Martin Renvoize 2017-04-28 15:30:07 UTC Comment hidden (obsolete)
Comment 38 Martin Renvoize 2017-04-28 15:30:11 UTC Comment hidden (obsolete)
Comment 39 Martin Renvoize 2017-04-28 15:30:15 UTC Comment hidden (obsolete)
Comment 40 Martin Renvoize 2017-04-28 15:30:19 UTC Comment hidden (obsolete)
Comment 41 Martin Renvoize 2017-04-28 15:30:23 UTC Comment hidden (obsolete)
Comment 42 Martin Renvoize 2017-04-28 15:30:27 UTC Comment hidden (obsolete)
Comment 43 Martin Renvoize 2017-04-28 15:30:31 UTC Comment hidden (obsolete)
Comment 44 Martin Renvoize 2017-04-28 15:30:35 UTC Comment hidden (obsolete)
Comment 45 Martin Renvoize 2017-04-28 15:30:39 UTC Comment hidden (obsolete)
Comment 46 Martin Renvoize 2017-04-28 15:30:43 UTC Comment hidden (obsolete)
Comment 47 Martin Renvoize 2017-04-28 15:30:47 UTC Comment hidden (obsolete)
Comment 48 Martin Renvoize 2017-04-28 15:30:51 UTC Comment hidden (obsolete)
Comment 49 Martin Renvoize 2017-04-28 15:30:55 UTC Comment hidden (obsolete)
Comment 50 Martin Renvoize 2017-04-28 15:30:59 UTC Comment hidden (obsolete)
Comment 51 Martin Renvoize 2017-04-28 15:31:03 UTC Comment hidden (obsolete)
Comment 52 Martin Renvoize 2017-04-28 15:31:08 UTC Comment hidden (obsolete)
Comment 53 Martin Renvoize 2017-04-28 15:31:12 UTC Comment hidden (obsolete)
Comment 54 Martin Renvoize 2017-04-28 15:31:16 UTC Comment hidden (obsolete)
Comment 55 Martin Renvoize 2017-04-28 15:33:30 UTC
It's your friendly git gopher again.. 

Uploaded signed off patches on behalf of Jon McGowan at PTFS Europe.  He and Jonathan Field have both rigorously tested this and you can see the feedback and testing results in the spreadsheet linked to above.

Signed Off.
Comment 56 Jonathan Druart 2017-06-02 16:02:19 UTC
I have rebased the remote branch and added the signed-off-by line.
Comment 57 Jonathan Druart 2017-06-02 16:06:24 UTC
Obsoleted the patches here to avoid confusions. The remote branch must be used.
Comment 58 Jonathan Druart 2017-12-05 17:36:49 UTC
The remote branch has been rebased.