3 /* load the script library */
4 load_lib('circ/circ_lib.js');
5 log_vars('circ_permit_patron');
9 if( isTrue(patron.barred) )
10 result.events.push('PATRON_BARRED');
13 /* ---------------------------------------------------------------------
14 Check the items out count
15 --------------------------------------------------------------------- */
16 var config = findGroupConfig(patronProfile);
19 var limit = config.maxItemsOut;
21 /* Patrons are allowed to renew regardless
22 of how many items they have checked out */
23 log_info('patron items out = ' + patronItemsOut +' limit = ' + limit);
24 if( !isTrue(isRenewal) && patronItemsOut >= limit ) {
25 result.events.push('PATRON_EXCEEDS_CHECKOUT_COUNT');
30 log_warn("** profile has no configured information: " + patronProfile);