From 773ac0e4a5be11122cca732d4aa51c8da40e3bb0 Mon Sep 17 00:00:00 2001 From: pzed Date: Tue, 18 Aug 2009 18:48:39 +0000 Subject: [PATCH] fix to allow Law Faculty to borrow stuff git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@624 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- circ/circ_permit_copy.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/circ/circ_permit_copy.js b/circ/circ_permit_copy.js index add78a0373..b7d05b6b6c 100644 --- a/circ/circ_permit_copy.js +++ b/circ/circ_permit_copy.js @@ -74,6 +74,31 @@ if (copy.circ_lib.shortname == 'OWA') { } } // end permissions for Windsor Leddy +// set permissions for Windsor Law +if (copy.circ_lib.shortname == 'OWAL') { + + // only Law external borrowers can borrow Law items + if (patronProfile == 'Readers' && patron.home_ou.shortname <> 'OWAL'){ + result.events.push('COPY_CIRC_NOT_ALLOWED'); + } + + // permit circulations for the following circ modifiers to all patrons not excluded above + var circ_allow_list = ['LAW MONO']; + + // add permissions for patron groups who are not external borrowers + if (patronProfile == 'Faculty' || patronProfile == 'Graduate' || patronProfile == 'Undergraduate' || patronProfile == 'Staff members') { + circ_allow_list = circ_allow_list.concat('LAW RES1D', 'LAW RES3D', 'LAW RES3H', 'LAW RES5H'); + } + + // faculty can borrow non-circulating items and serials + if (patronProfile == 'Faculty') { + circ_allow_list = circ_allow_list.concat('LAW NOCIRC', 'LAW SERIAL'); + } + + if ( ! testCircAllow(circ_allow_list) ) { + result.events.push('COPY_CIRC_NOT_ALLOWED'); + } +} // end permissions for Windsor Law if( ! isTrue(isRenewal) ) { if(copyStatus != 'Available' && -- 2.11.0