Bug 11911: Add a separate permission for managing suggestions
authorKatrin Fischer <katrin.fischer.83@web.de>
Fri, 18 May 2018 10:40:21 +0000 (10:40 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 23 Jul 2018 15:34:20 +0000 (15:34 +0000)
commitb8a2365a3455a70ef8bdcb99e74b419bc4572b96
tree6be8f29af60b9951c9fae77d6c7315bf00361eb3
parent1ea7d9790d31ecf52dcf6d9070650b4cab77b17b
Bug 11911: Add a separate permission for managing suggestions

Without this patch only catalogue permission was required
for managing suggestions. This patch adds a new permission
in the acquisition module do manage suggestions and updates
staff user permissions accordingly.

To test:
- Make sure there is a pending suggestion
- Create a few users with different permission sets:
  - User 1: only catalogue
  - User 2: any acquisition permission
  - User 3: cataloguing permission
- Check all of them can access: /cgi-bin/koha/suggestion/suggestion.pl
- Apply the patch
- Verify all of them now have the suggestions_manage permission
- Verify everything displays correctly on:
  - intranet start page
  - patron account in staff
  - acquisition start page
  - suggestion page (try to access by URL too)
- Remove suggestions_manage for a staff user
- Repeat tests above, access should be denied/links not visible

Bonus:
- Fixes the link on the acquisition start page for late orders
  to mage the permissions of the page itself: order_receive

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug11911_suggestions_permission.sql [new file with mode: 0644]
installer/data/mysql/userpermissions.sql
koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
members/purchase-suggestions.pl
suggestion/suggestion.pl