Bug 16459

Summary: Adding patrons to a patron card label batch requires 'routing' permission
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Label/patron card printingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: frederic, jonathan.druart+koha, julian.maurice, kyle, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16459: Add patron to a patron card requires catalogue permission
[SIGNED-OFF] Bug 16459: Add patron to a patron card requires catalogue permission
Bug 16459: Add patron to a patron card requires catalogue permission

Description Katrin Fischer 2016-05-05 21:50:59 UTC
When adding patrons to a patron card batch using the search for patrons feature, the required permission is 'routing'... which  makes no sense.
Comment 1 Jonathan Druart 2016-05-06 14:57:47 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2016-05-08 12:08:54 UTC
The patron card creator link on the tools home page uses:
CAN_user_tools_label_creator
I think that would make sense to me overall.
Comment 3 Jonathan Druart 2016-05-09 09:24:24 UTC
(In reply to Katrin Fischer from comment #2)
> The patron card creator link on the tools home page uses:
> CAN_user_tools_label_creator
> I think that would make sense to me overall.

Yes but it's the only script in this directory, others use catalogue.
Moreover patroncards/edit-batch.pl, which calls add_user_search.pl, uses catalogue also, it would not make sense to have different perms.

If we need to fix the whole module, it should be done on another bug report.
Comment 4 Katrin Fischer 2016-05-09 09:29:37 UTC
Ok - It sure doesn't make much sense now :) 

Having another bug report sounds good - maybe it would be best to add a new permission just for this tool.
Comment 5 Marc Véron 2016-05-10 09:49:15 UTC
Tested with patch:

- Set permissions 'catalogue' and 'label_creator'
- Go to Home > Tools > Patron card creator
- New card batch
- Add patrons
- Search windows pops up. Do a search.
Result: Endless "Processing"

- Set addtitionally permission 'borrowers'
Result: Search window works as expected, patrons are found and can be selected.

I think there should be two separate permissions for '...creator', one for labels ('label_creator') and one for patron cards ('patroncard_creator'). The latter would then additionally need 'borrowers' (with a hint in the description)
Comment 6 Srdjan Jankovic 2016-05-23 03:00:49 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2016-06-24 15:35:53 UTC
Created attachment 52814 [details] [review]
Bug 16459: Add patron to a patron card requires catalogue permission

Currently, serials => 'routing' is required, which does not make any
sense.
It's a copy/paste error when this file has been created (you can blame
me).

Note that I am not sure catalogue is the correct permission, but it's
the one used almost everywhere in this module

Test plan:
Confirm that catalogue is enough to search for patrons to add to a
patron card.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2016-07-08 12:46:46 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 9 Frédéric Demians 2016-08-01 13:21:09 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 10 Julian Maurice 2016-08-16 14:16:59 UTC
Patch pushed to 3.22.x, will be in 3.22.10