Bug 15520: Add permission to restrict circ rules editing to own library
authorJesse Weaver <jweaver@bywatersolutions.com>
Thu, 31 Aug 2017 23:02:42 +0000 (17:02 -0600)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 9 Oct 2018 15:02:50 +0000 (15:02 +0000)
commit82db1e1589f2d3f3f92dcab2fba7fce1fc26f2d9
tree4d1352e9b46ebb39b69921898634278194b0dde7
parentb3d0bef13650d830b2a3d832a404c2847e727166
Bug 15520: Add permission to restrict circ rules editing to own library

Test plan:

1) Ensure that you have four users:
 a) A superlibrarian
 b) A user with all `parameters` permissions (the toplevel `parameters`
    box is checked).
 c) A user with the `manage_circ_rules` permission (and, of course,
    `catalogue`).
 d) A user with the `manage_circ_rules`, `manage_circ_rules_restricted`
    and `catalogue` permissions.
2) As all four users, load the "Circulation and fine rules"
   administration page (admin/smart-rules.pl).
3) The page should be unchanged for the first three users. It should be
   possible to view and edit the circ rules for all libraries.
4) The last (restricted) user should only be able to view and edit the
   circ rules for their own library.

Amended by JD: In a second version of this patch
manage_circ_rules_restricted has been replaced by
manage_circ_rules_from_any_libraries and 'no_inherit' related code has
been removed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
admin/smart-rules.pl
installer/data/mysql/atomicupdate/bug_15520-add_manage_circ_rules_restricted.sql [new file with mode: 0644]
installer/data/mysql/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt