From: Chris Sharp Date: Thu, 31 Jan 2019 20:27:27 +0000 (-0500) Subject: adding script to add student profile for LOPL X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9ba4bfd9332773cec953810ba00bdd36b58cdc6a;p=contrib%2Fpines.git adding script to add student profile for LOPL --- diff --git a/sql/add_student_card_profile.sql b/sql/add_student_card_profile.sql new file mode 100644 index 0000000..2824b09 --- /dev/null +++ b/sql/add_student_card_profile.sql @@ -0,0 +1,74 @@ +-- adding the LOPL student card pilot +BEGIN; + +-- create user group +insert into permission.grp_tree ( + name, + parent, + usergroup, + perm_interval, + description, + application_perm +) values ( + 'Student Card (pilot)', + (select id from permission.grp_tree where name = 'Patrons'), + true, + '1 year', + 'Student card pilot program for LOPL', + 'group_application.user.patron' +); + +-- 2 items out at a time +insert into permission.grp_penalty_threshold ( + grp, + org_unit, + penalty, + threshold +) values ( + (select id from permission.grp_tree where name = 'Student Card (pilot)'), + 1, + (select id from config.standing_penalty where name = 'PATRON_EXCEEDS_CHECKOUT_COUNT'), + 2.00 +); + +-- no fines +insert into config.circ_matrix_matchpoint ( + org_unit, + grp, + circulate, + max_fine_rule +) values ( + 1, + (select id from permission.grp_tree where name = 'Student Card (pilot)'), + true, + (select id from config.rule_max_fine where name = 'no_fines') +); + +-- 2 holds at a time +insert into config.hold_matrix_matchpoint ( + requestor_grp, + usr_grp, + stop_blocked_user, + max_holds +) values ( + 1, + (select id from permission.grp_tree where name = 'Student Card (pilot)'), + true, + 2 +); + +-- set display entry +insert into permission.grp_tree_display_entry ( + position, + org, + grp, + parent +) values ( + 5, + 1, + (select id from permission.grp_tree where name = 'Student Card (pilot)'), + 1 +); + +COMMIT; +