]> git.koha-community.org Git - koha.git/commit
Bug 14354: Prevent edition of items from other branches if IndependentBranches is on
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 14 Jul 2015 17:07:37 +0000 (18:07 +0100)
committerMason James <mtj@kohaaloha.com>
Mon, 28 Sep 2015 12:07:11 +0000 (01:07 +1300)
commit821aa63e4126331ad36164ac98f5f4093bbb72ed
treefc34f52041b9f7528533096bfa7a8d27bba9bce1
parent46559c51e7de4bfaa77eb5878d82c7b85707bfbd
Bug 14354: Prevent edition of items from other branches if IndependentBranches is on

If IdependentBranches is ON, to edit/delete items from other branches
you need to be superlibrarian.
Currently a "simple" staff user cannot edit them from the edit item page
but from the catalogue detail page.

The edit links should not be displayed on this table.

Test plan:
O/ Set IndependentBranches to "Prevent".
Create a record and add 2 items:
   Set homebranch to L1 for item I1.
   Set homebranch to L2 for item I2.
1/ With a superlibrarian user, you should be able to edit both items.
2/ With a "simple" user attached to L1, you should only be able to edit
I1. The edit links should not be displayed for I2.

Note that the checkbox is displayed on the catalogue detail page (item
list), but on the batch tools, it won't be possible to select non-modifiable
items.

TODO: Add a server-side check. Indeed it is still possible to edit an
item if the user know the url.

Followed test plan. Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcab2416399e93f5ce9b1083395c052046d5d02a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
(cherry picked from commit 28fe340ea75475903a1063f734dec45781d35f90)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt