fix to allow Law Faculty to borrow stuff
authorpzed <pzed@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Tue, 18 Aug 2009 18:48:39 +0000 (18:48 +0000)
committerpzed <pzed@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Tue, 18 Aug 2009 18:48:39 +0000 (18:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@624 6d9bc8c9-1ec2-4278-b937-99fde70a366f

circ/circ_permit_copy.js

index add78a0..b7d05b6 100644 (file)
@@ -74,6 +74,31 @@ if (copy.circ_lib.shortname == 'OWA') {
        }\r
 } // end permissions for Windsor Leddy\r
 \r
+// set permissions for Windsor Law\r
+if (copy.circ_lib.shortname == 'OWAL') {\r
+\r
+       // only Law external borrowers can borrow Law items\r
+       if (patronProfile == 'Readers' && patron.home_ou.shortname <> 'OWAL'){\r
+               result.events.push('COPY_CIRC_NOT_ALLOWED');\r
+       }\r
+\r
+       // permit circulations for the following circ modifiers to all patrons not excluded above\r
+       var circ_allow_list = ['LAW MONO'];\r
+\r
+       // add permissions for patron groups who are not external borrowers\r
+       if (patronProfile == 'Faculty' || patronProfile == 'Graduate' || patronProfile == 'Undergraduate' || patronProfile == 'Staff members') {\r
+               circ_allow_list = circ_allow_list.concat('LAW RES1D', 'LAW RES3D', 'LAW RES3H', 'LAW RES5H');\r
+       }\r
+\r
+       // faculty can borrow non-circulating items and serials\r
+       if (patronProfile == 'Faculty') {\r
+               circ_allow_list = circ_allow_list.concat('LAW NOCIRC', 'LAW SERIAL');\r
+       }\r
+\r
+       if ( ! testCircAllow(circ_allow_list) ) {\r
+               result.events.push('COPY_CIRC_NOT_ALLOWED');\r
+       }\r
+} // end permissions for Windsor Law\r
 \r
 if( ! isTrue(isRenewal) ) {\r
        if(copyStatus != 'Available' && \r