[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 2e50b041803796665fa10270dafeae79c1d0bbe1

Evergreen Git git at git.evergreen-ils.org
Thu Jul 14 15:50:19 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_1 has been updated
       via  2e50b041803796665fa10270dafeae79c1d0bbe1 (commit)
       via  2de24c61c951dfb78ea5ae2ac8aa77255f610ebd (commit)
       via  6719fcef8faceab7a355a9f405eb31d6cbda9190 (commit)
      from  3c073f40b9a3052bed8baad97dab722fd9d22a1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2e50b041803796665fa10270dafeae79c1d0bbe1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 14 15:48:41 2011 -0400

    Stamped upgrade script for collections_exempt_perm
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql b/Open-ILS/src/sql/Pg/upgrade/0563.data.collections_exempt_perm.sql
similarity index 91%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql
rename to Open-ILS/src/sql/Pg/upgrade/0563.data.collections_exempt_perm.sql
index dc4c2fd..a63cead 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0563.data.collections_exempt_perm.sql
@@ -6,7 +6,7 @@ BEGIN;
 
 
 -- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+INSERT INTO config.upgrade_log (version) VALUES ('0563');
 
 INSERT INTO permission.perm_list ( id, code, description ) 
     VALUES ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,

commit 2de24c61c951dfb78ea5ae2ac8aa77255f610ebd
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 3 09:28:42 2011 -0400

    Un-stamped upgrade script for collection exempt perm
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index d82af0b..6f1a071 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -1423,7 +1423,7 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
     'Allows update of a workstation during workstation registration override.', 'ppl', 'description')),
  ( 506, 'VIEW_USER_SETTING_TYPE', oils_i18n_gettext(506,
     'Allows viewing of configurable user setting types.', 'ppl', 'description')),
- ( 509, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(509,
+ ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
     'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
 
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql
new file mode 100644
index 0000000..dc4c2fd
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.collections_exempt_perm.sql
@@ -0,0 +1,26 @@
+-- Evergreen DB patch XXXX.data.collections_exempt_perm.sql
+--
+-- Adds a new UPDATE_PATRON_COLLECTIONS_EXEMPT permission
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO permission.perm_list ( id, code, description ) 
+    VALUES ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
+    'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
+
+--- stock Circulation Administrator group
+
+INSERT INTO permission.grp_perm_map ( grp, perm, depth, grantable )
+    SELECT
+        4,
+        id,
+        0,
+        't'
+    FROM permission.perm_list
+    WHERE code in ('UPDATE_PATRON_COLLECTIONS_EXEMPT');
+
+COMMIT;

commit 6719fcef8faceab7a355a9f405eb31d6cbda9190
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 3 09:27:26 2011 -0400

    Permission to control patron-collections-exempt
    
    Adds a new permission 'UPDATE_PATRON_COLLECTIONS_EXEMPT' which controls
    who can toggle the circ.collections.exempt user setting in the patron
    registration interface.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 0767cae..d82af0b 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -1422,7 +1422,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 505, 'UPDATE_WORKSTATION', oils_i18n_gettext(505,
     'Allows update of a workstation during workstation registration override.', 'ppl', 'description')),
  ( 506, 'VIEW_USER_SETTING_TYPE', oils_i18n_gettext(506,
-    'Allows viewing of configurable user setting types.', 'ppl', 'description'));
+    'Allows viewing of configurable user setting types.', 'ppl', 'description')),
+ ( 509, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(509,
+    'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
 
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
@@ -1905,6 +1907,7 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
 			'UPDATE_HOLD_REQUEST_TIME',
 			'UPDATE_NET_ACCESS_LEVEL',
 			'VIEW_CIRC_MATRIX_MATCHPOINT',
+            'UPDATE_PATRON_COLLECTIONS_EXEMPT',
 			'VIEW_HOLD_MATRIX_MATCHPOINT');
 
 INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 12ee21e..8e3c1dd 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -593,6 +593,10 @@ function uEditDrawSettingRow(tbody, dividerRow, template, stype) {
     dojo.connect(cb, 'onChange', function(newVal) { userSettingsToUpdate[stype.name()] = newVal; });
     tbody.insertBefore(row, dividerRow.nextSibling);
     openils.Util.show(row, 'table-row');
+
+    if(stype.name() == 'circ.collections.exempt') {
+        checkCollectionsExemptPerm(cb);
+    }
 }
 
 function uEditUpdateUserSettings(userId) {
@@ -894,6 +898,22 @@ function checkClaimsNoCheckoutCountPerm() {
     );
 }
 
+var collectExemptCBox;
+function checkCollectionsExemptPerm(cbox) {
+    if(cbox) collectExemptCBox = cbox;
+    new openils.User().getPermOrgList(
+        'UPDATE_PATRON_COLLECTIONS_EXEMPT',
+        function(orgList) { 
+            if(orgList.indexOf(patron.home_ou()) == -1) 
+                collectExemptCBox.attr('disabled', true);
+            else
+                collectExemptCBox.attr('disabled', false);
+        },
+        true, 
+        true
+    );
+}
+
 
 function attachWidgetEvents(fmcls, fmfield, widget) {
 
@@ -1085,6 +1105,7 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
                     function(newVal) { 
                         checkClaimsReturnCountPerm(); 
                         checkClaimsNoCheckoutCountPerm();
+                        checkCollectionsExemptPerm();
                     }
                 );
                 return;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    5 +++-
 .../upgrade/0563.data.collections_exempt_perm.sql  |   26 ++++++++++++++++++++
 Open-ILS/web/js/ui/default/actor/user/register.js  |   21 ++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0563.data.collections_exempt_perm.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list