[open-ils-commits] r17853 - in trunk/Open-ILS/src: perlmods/OpenILS/Application sql/Pg sql/Pg/upgrade (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 20 18:47:35 EDT 2010
Author: senator
Date: 2010-09-20 18:47:35 -0400 (Mon, 20 Sep 2010)
New Revision: 17853
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
How about one more permission check for serials here? Need more comprehensive
review of this later.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-09-20 22:10:44 UTC (rev 17852)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm 2010-09-20 22:47:35 UTC (rev 17853)
@@ -1247,6 +1247,7 @@
my $e = new_editor("authtoken" => $auth, "xact" => 1);
return $e->die_event unless $e->checkauth;
+ return $e->die_event unless $e->allowed("RECEIVE_SERIAL");
my $user_id = $e->requestor->id;
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-20 22:10:44 UTC (rev 17852)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-20 22:47:35 UTC (rev 17853)
@@ -68,7 +68,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0408'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0409'); -- senator
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-20 22:10:44 UTC (rev 17852)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-20 22:47:35 UTC (rev 17853)
@@ -1389,6 +1389,7 @@
,(398, 'ADMIN_SERIAL_SUBSCRIPTION', oils_i18n_gettext(398, 'Create/update/delete serial subscription objects', 'ppl', 'description'))
,(399, 'ADMIN_SERIAL_DISTRIBUTION', oils_i18n_gettext(399, 'Create/update/delete serial distribution objects', 'ppl', 'description'))
,(400, 'ADMIN_SERIAL_STREAM', oils_i18n_gettext(400, 'Create/update/delete serial stream objects', 'ppl', 'description'))
+ ,(401, 'RECEIVE_SERIAL', oils_i18n_gettext(401, 'Receive serial items', 'ppl', 'description'))
;
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql 2010-09-20 22:47:35 UTC (rev 17853)
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0409'); -- senator
+
+INSERT INTO permission.perm_list (id, code, description) VALUES
+ (401, 'RECEIVE_SERIAL', oils_i18n_gettext(401, 'Receive serial items', 'ppl', 'description'));
+
+COMMIT;
More information about the open-ils-commits
mailing list