Bug 9780: restrict the ability to delete a bib record associated with an order
Currently, anyone can delete a record used in an order.
With this patch, only librarians with managing order permission
can delete it if it is used in an active or a deleted order.
This patch also add a specific warning informing that deleting a record
used in an active order is dangerous.
To test :
A. test what can do and see a librarian with order managing rights
0) Connect to Koha with a borrower with order managing rights
1) in a basket, create 2 orders A & B from new records
2) delete order B
3) in the catalogue, try to delete
- record used for order A : you should see a specific warning
informing you the record is used in 1 order, and that deleting it
is dangerous
- record used for order B : you should see a specific warning informing
you the record is used in 1 deleted order
- a record not used in any order : you should see no specific warning
B. test what can do and see a librarian without order managing rights
4) Connect to Koha with a borrower without order managing rights
5) in a basket, create 2 orders A & B from new records
6) delete order B
7) in the catalogue, try to delete
- record used for order A : you should see a specific warning informing you that
you need specific rights to delete the record
- record used for order B : idem
- a record not used in any order : you should see no specific warning
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>