Bug 13662: Fix the serials.receive_serials permissions
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 3 Feb 2015 12:25:47 +0000 (13:25 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 5 Jun 2015 15:53:09 +0000 (12:53 -0300)
commite6040977409ffe4dc6a23f6d76c3bd1f528837d0
treeee6b18dccc37982dff22565890a8528c6f96d5b1
parent8e9f89e92b48f1aac786e9b5608338a14603f52f
Bug 13662: Fix the serials.receive_serials permissions

There are some issues with serial permissions.
For instance it's not possible to receive serials if the
edit_subscription is not set.
Also the toolbar is empty.

Test plan:
1/ Set the serials => receive_serials permissions to a patron (and only
this one for the serials module).
2/ Verify you cannot create a new subscription, you can search
subscriptions but cannot edit them.
3/ On the serial result list, receive a serial (action > Serial
receive).
You can now change the status and receive it.
4/ On the serial collection, you can edit 1+ serials to reveice it.
5/ Set the serials => edit_subscription permission and confirm there is
no regression.

QA note: I think we should introduce a C4::Serials::can_receive_serials
subroutine, to test the IndependentBranches pref, but I don't want to
add to much processing to check permissions.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
serials/serials-edit.pl