[open-ils-commits] r12263 - in trunk/Open-ILS/src: perlmods/OpenILS/Application sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 22 11:42:59 EST 2009
Author: erickson
Date: 2009-02-22 11:42:57 -0500 (Sun, 22 Feb 2009)
New Revision: 12263
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
insert org-setting perms. added an _ALL perm to override the individual perms
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-02-22 14:30:41 UTC (rev 12262)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-02-22 16:42:57 UTC (rev 12263)
@@ -102,11 +102,15 @@
my $e = new_editor(authtoken => $auth, xact => 1);
return $e->die_event unless $e->checkauth;
+ my $all_allowed = $e->allowed("UPDATE_ORG_UNIT_SETTING_ALL", $org_id);
+
for my $name (keys %$settings) {
my $val = $$settings{$name};
my $set = $e->search_actor_org_unit_setting({org_unit => $org_id, name => $name})->[0];
- return $e->die_event unless $e->allowed("UPDATE_ORG_UNIT_SETTING.$name", $org_id);
+ unless($all_allowed) {
+ return $e->die_event unless $e->allowed("UPDATE_ORG_UNIT_SETTING.$name", $org_id);
+ }
if(defined $val) {
$val = OpenSRF::Utils::JSON->perl2JSON($val);
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-02-22 14:30:41 UTC (rev 12262)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-02-22 16:42:57 UTC (rev 12263)
@@ -1290,8 +1290,34 @@
INSERT INTO permission.perm_list (code) VALUES ('UPDATE_IMPORT_ITEM_ATTR_DEF');
INSERT INTO permission.perm_list (code) VALUES ('UPDATE_IMPORT_TRASH_FIELD');
+-- ORG UNIT Settings
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING_ALL');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.lost_materials_processing_fee');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.cat.default_item_price');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.auth.opac_timeout');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.auth.staff_timeout');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.org.bounced_emails');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.hold_expire_alert_interval');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.hold_expire_interval');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.global.credit.allow');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.void_overdue_on_lost');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.hold_stalling.soft');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.hold_boundary.hard');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.hold_boundary.soft');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.opac.barcode_regex');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.global.password_regex');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.item_checkout_history.max');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.reshelving_complete.interval');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.selfcheck.patron_login_timeout');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.selfcheck.alert_on_checkout_event');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.circ.selfcheck.require_patron_password');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.global.juvenile_age_threshold');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.cat.bib.keep_on_empty');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.cat.bib.alert_on_empty');
+INSERT INTO permission.perm_list (code) VALUES ('UPDATE_ORG_UNIT_SETTING.patron.password.use_phone');
+
INSERT INTO permission.grp_tree (id, name, parent, description, perm_interval, usergroup, application_perm) VALUES
(1, oils_i18n_gettext(1, 'Users', 'pgt', 'name'), NULL, NULL, '3 years', FALSE, 'group_application.user');
INSERT INTO permission.grp_tree (id, name, parent, description, perm_interval, usergroup, application_perm) VALUES
More information about the open-ils-commits
mailing list