Add permissions for link checking and circ rules
authorDan Scott <dscott@laurentian.ca>
Thu, 9 May 2013 17:27:15 +0000 (13:27 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 9 May 2013 17:35:21 +0000 (13:35 -0400)
Also add all local administrators to the Circulation Administrator and
Cataloguing Administrator groups. Because they need power.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/version-upgrade/conifer-2_4_step4c.sql

index 2b2138a..fcc7018 100644 (file)
@@ -3628,6 +3628,29 @@ WHERE name = 'Traditional with Holds-go-home' AND
     depth = 7 AND
     rtime = 8 ;
 
+-- Give circulation administrators the ability to administer circulation
+INSERT INTO permission.grp_perm_map (grp, perm, depth) VALUES (9, 407, 1);
+INSERT INTO permission.grp_perm_map (grp, perm, depth) VALUES (9, 415, 1);
+
+-- Give super circulators the ability to view circulation rules
+INSERT INTO permission.grp_perm_map (grp, perm, depth) VALUES (118, 477, 1);
+INSERT INTO permission.grp_perm_map (grp, perm, depth) VALUES (118, 480, 1);
+
+-- Give cataloging administrators the ability to run the link checker
+INSERT INTO permission.grp_perm_map (grp, perm, depth) VALUES (8, 543, 1);
+
+-- Include all local administrators in the cataloguing administrator group
+INSERT INTO permission.usr_grp_map (usr, grp)
+    SELECT usr, 8
+    FROM permission.usr_grp_map
+    WHERE grp = 10 AND usr NOT IN (7308, 12352, 15429, 215095);
+
+-- Include all local administrators in the circulation administrator group
+WITH party AS (SELECT usr FROM permission.usr_grp_map WHERE grp = 9)
+INSERT INTO permission.usr_grp_map (usr, grp)
+    SELECT usr, 9
+    FROM permission.usr_grp_map
+    WHERE grp = 10 AND usr NOT IN (SELECT usr FROM party);
 
 COMMIT;