[open-ils-commits] r443 - conifer/trunk/tools/migration-scripts (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun May 3 13:40:46 EDT 2009


Author: dbs
Date: 2009-05-03 13:40:43 -0400 (Sun, 03 May 2009)
New Revision: 443

Modified:
   conifer/trunk/tools/migration-scripts/patron_groups.sql
Log:
Add a staff members borrowing profile
Prevent duplication of perms as we'll map staff to multiple perm groups instead


Modified: conifer/trunk/tools/migration-scripts/patron_groups.sql
===================================================================
--- conifer/trunk/tools/migration-scripts/patron_groups.sql	2009-05-03 15:41:11 UTC (rev 442)
+++ conifer/trunk/tools/migration-scripts/patron_groups.sql	2009-05-03 17:40:43 UTC (rev 443)
@@ -6,30 +6,18 @@
 INSERT INTO permission.grp_tree (name, parent, usergroup, perm_interval, description, application_perm) VALUES ('Graduate', 2, 't', '1 year', 'Graduate', 'group_application.user.patron');
 INSERT INTO permission.grp_tree (name, parent, usergroup, perm_interval, description, application_perm) VALUES ('Undergraduate', 2, 't', '1 year', 'Undergraduate', 'group_application.user.patron');
 INSERT INTO permission.grp_tree (name, parent, usergroup, perm_interval, description, application_perm) VALUES ('Readers', 2, 't', '1 year', 'Readers', 'group_application.user.patron');
+INSERT INTO permission.grp_tree (name, parent, usergroup, perm_interval, description, application_perm) VALUES ('Staff members', 2, 't', '1 year', 'Staff members', 'group_application.user.patron');
 
--- (11 = Faculty, 12 = Graduate, 13 = Undergraduate, 14 = Reader)
+-- (11 = Faculty, 12 = Graduate, 13 = Undergraduate, 14 = Reader, 15 = Staff members)
 
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
-    SELECT 11, perm, depth, grantable FROM permission.grp_perm_map
-    WHERE grp = 2;
-
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
-    SELECT 12, perm, depth, grantable FROM permission.grp_perm_map
-    WHERE grp = 2;
-
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
-    SELECT 13, perm, depth, grantable FROM permission.grp_perm_map
-    WHERE grp = 2; 
-
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
-    SELECT 14, perm, depth, grantable FROM permission.grp_perm_map
-    WHERE grp = 2; 
-
 -- Not really necessary, unless you want to restrict the ability to add
 INSERT INTO permission.perm_list (code, description) VALUES
     ('group_application.user.patron.faculty', 'Allow a user to add/remove users to/from the "Faculty" group'),
     ('group_application.user.patron.grad', 'Allow a user to add/remove users to/from the "Graduate students" group'),
-    ('group_application.user.patron.undergrad', 'Allow a user to add/remove users to/from the "Undergraduate students" group');
+    ('group_application.user.patron.undergrad', 'Allow a user to add/remove users to/from the "Undergraduate students" group')
+    ('group_application.user.patron.reader', 'Allow a user to add/remove users to/from the "Readers" group'),
+    ('group_application.user.patron.staff', 'Allow a user to add/remove users to/from the "Staff members" group'),
+;
 
 -- Give circulators the ability to abort transits
 -- ABORT_TRANSIT = perm 111, ABORT_REMOTE_TRANSIT = perm 112
@@ -67,19 +55,4 @@
 UPDATE permission.grp_perm_map SET depth = 2
     WHERE grp = 3 AND perm = 31; 
 
--- New circ rules, to match our JavaScript
-INSERT INTO config.rule_circ_duration (name, extended, normal, shrt, max_renewals)
-     VALUES ('120_days_2_renew', '120 days', '120 days', '120 days', 2),
-    ('3_weeks_2_renew', '3 weeks', '3 weeks', '3 weeks', 2); 
-
--- Give local system administrators any permissions other staff have
-INSERT INTO permission.grp_perm_map (grp, depth, perm)
-    SELECT DISTINCT 10, 2, perm
-    FROM permission.grp_perm_map
-    WHERE grp IN (3, 4, 5) AND perm NOT IN (
-        SELECT perm
-        FROM permission.grp_perm_map
-        WHERE grp = 10
-    )
-; 
 COMMIT;



More information about the open-ils-commits mailing list