]> git.evergreen-ils.org Git - working/Evergreen.git/commit
In actor.usr_purge_data, default destination user to admin (id=1).
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 31 Jan 2011 18:53:20 +0000 (18:53 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 31 Jan 2011 18:53:20 +0000 (18:53 +0000)
commit056225a4d06f3d1c533f90117a6947899cdc2fca
treedb1f1052092a170228aba69707035253de56336c
parent3e5eba9ebdafe5f35dcdb36c496f2f36eabfc322
In actor.usr_purge_data, default destination user to admin (id=1).

Destination user is where we move things like reports and acq picklists when
purging staff members.  However, if we tried to purge a patron that used to be
a staff member, then destination user was being set to null, which won't work
when updating things like requestor on holds.  The purge UI checks for the
STAFF_LOGIN permission on the user to be purged for determining whether to
prompt for a destination user or not.

Some alternatives to this change might include:
1) always asking for a destination user (and defaulting to admin or the
logged in staff member), or
2) robustifying the stored procedure and surrounding code to raise an
expected exception whenever this edge case hits, prompting the UI to try
again after asking for a destination user.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19344 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/999.functions.global.sql
Open-ILS/src/sql/Pg/upgrade/0480.schema.actor_usr_purge_data.sql [new file with mode: 0644]