Bug 9032: enforce consistent behavior when deleting lists
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 5 Mar 2014 15:26:40 +0000 (16:26 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 20 Apr 2014 21:20:37 +0000 (21:20 +0000)
commit4c877bb7c9170902a41f07a29adaa33e14dd4171
tree1f05123db193bb3eda3c8c30d1d960db7a28090b
parentd1244ad33ff28c34e6c729775685c24856822579
Bug 9032: enforce consistent behavior when deleting lists

DelShelf deletes a list regardless whether it is private, shared or
public. HandleDelBorrower had another approach, trying to save shared
and public lists by setting the owner to NULL.

This patch makes both routines behave consistently.

A new report 11889 has been opened to discuss the 'disowning' feature.

NOTE: I did not add a db revision here to handle possible cases of lists
without owner in the current data. Such public (or shared) lists can still
be used without any problem. Bug 11889 and a new planned report for a lists
management tool will address this topic further on. After that, all goals
of umbrella report 7310 should be realized.

Test plan:
Create a list P1 with user1 that allows adding by other users.
Add a patron (user2).
Login as user2 and create some lists, add some items.
Let user2 add some entries to P1 too.
Delete patron user2.
Verify that his lists are gone, but his entries in P1 are kept (nullified).

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/VirtualShelves.pm