[open-ils-commits] [GIT] Evergreen ILS branch master updated. 064372f160214538c92fe0bb67ee119369521d21
Evergreen Git
git at git.evergreen-ils.org
Fri Jun 24 09:48:10 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, master has been updated
via 064372f160214538c92fe0bb67ee119369521d21 (commit)
via 690618a0510ccdf8efd5623397972fe01a6d99f9 (commit)
via 368f391165fef5b71810f324d33f5c1720ab0f18 (commit)
from 2d096d936c4467ae407bc2c8ade02d96aa3e752b (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 064372f160214538c92fe0bb67ee119369521d21
Author: Mike Rylander <mrylander at gmail.com>
Date: Fri Jun 24 09:44:56 2011 -0400
Stamp the upgrade with a version number
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 0a11e2f..5ce512c 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0562', :eg_version); -- berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0563', :eg_version); -- berick via miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
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..a7e6856 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);
+SELECT evergreen.upgrade_deps_block_check('0563', :eg_version);
INSERT INTO permission.perm_list ( id, code, description )
VALUES ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
commit 690618a0510ccdf8efd5623397972fe01a6d99f9
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 5659043..a134560 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -1427,10 +1427,10 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
'Allows a user to abort a transit on a copy with status of LOST', 'ppl', 'description')),
( 508, 'ABORT_TRANSIT_ON_MISSING', oils_i18n_gettext(508,
'Allows a user to abort a transit on a copy with status of MISSING', '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')),
- ( 510, 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', oils_i18n_gettext(510,
- 'Allows a user to override the TRANSIT_CHECKIN_INTERVAL_BLOCK event', 'ppl', 'description'));
+ ( 509, 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', oils_i18n_gettext(509,
+ 'Allows a user to override the TRANSIT_CHECKIN_INTERVAL_BLOCK event', 'ppl', 'description')),
+ ( 510, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(510,
+ 'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description'));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
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 368f391165fef5b71810f324d33f5c1720ab0f18
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 8dd539c..5659043 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -1427,7 +1427,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
'Allows a user to abort a transit on a copy with status of LOST', 'ppl', 'description')),
( 508, 'ABORT_TRANSIT_ON_MISSING', oils_i18n_gettext(508,
'Allows a user to abort a transit on a copy with status of MISSING', 'ppl', 'description')),
- ( 509, 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', oils_i18n_gettext(509,
+ ( 509, 'UPDATE_PATRON_COLLECTIONS_EXEMPT', oils_i18n_gettext(509,
+ 'Allows a user to indicate that a patron is exempt from collections processing', 'ppl', 'description')),
+ ( 510, 'TRANSIT_CHECKIN_INTERVAL_BLOCK.override', oils_i18n_gettext(510,
'Allows a user to override the TRANSIT_CHECKIN_INTERVAL_BLOCK event', 'ppl', 'description'));
@@ -1913,6 +1915,7 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
'VIEW_CIRC_MATRIX_MATCHPOINT',
'ABORT_TRANSIT_ON_LOST',
'ABORT_TRANSIT_ON_MISSING',
+ '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 43864d3..be1c111 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/002.schema.config.sql | 2 +-
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 ++++++++++++++++
4 files changed, 52 insertions(+), 2 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