]> git.koha-community.org Git - koha.git/commit
Bug 7295: More granular permissions for baskets
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 20 Apr 2012 15:12:29 +0000 (17:12 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 31 Oct 2013 16:35:35 +0000 (16:35 +0000)
commit54616c37e25b969907f9da2cf021e7e23ced836c
tree9d6045e4493b82da443b7b99563bddfb34d298bc
parent6e3e1eed4829f1b11e571e2c77a8b37f66af943d
Bug 7295: More granular permissions for baskets

- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
19 files changed:
C4/Acquisition.pm
acqui/aqbasketuser_search.pl [new file with mode: 0755]
acqui/basket.pl
acqui/booksellers.pl
installer/data/mysql/de-DE/mandatory/userpermissions.sql
installer/data/mysql/en/mandatory/userpermissions.sql
installer/data/mysql/es-ES/mandatory/userpermissions.sql
installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
installer/data/mysql/it-IT/necessari/userpermissions.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
installer/data/mysql/pl-PL/mandatory/userpermissions.sql
installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql
installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/aqbasketuser_search.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
t/Acquisition/CanUserManageBasket.t [new file with mode: 0644]