Backport r17853 from trunk
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 22:51:28 +0000 (22:51 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 22:51:28 +0000 (22:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@17854 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql [new file with mode: 0644]

index 9dce726..f6b53cb 100644 (file)
@@ -1247,6 +1247,7 @@ sub receive_items_one_unit_per {
 
     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;
 
index e90f171..b5ed575 100644 (file)
@@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log (
     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,
index 405feb7..0cd78bc 100644 (file)
@@ -1953,7 +1953,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 482, 'ADMIN_SERIAL_DISTRIBUTION', oils_i18n_gettext( 482, 
     'ADMIN_SERIAL_DISTRIBUTION', 'ppl', 'description' )),
  ( 483, 'ADMIN_SERIAL_STREAM', oils_i18n_gettext( 483, 
-    'ADMIN_SERIAL_STREAM', 'ppl', 'description' ));
+    'ADMIN_SERIAL_STREAM', 'ppl', 'description' )),
+ ( 484, 'RECEIVE_SERIAL', oils_i18n_gettext(484, 'Receive serial items', 'ppl', 'description'));
+
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql b/Open-ILS/src/sql/Pg/upgrade/0409.data.receive-serial-perm.sql
new file mode 100644 (file)
index 0000000..9edad48
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0409'); -- senator
+
+INSERT INTO permission.perm_list (id, code, description) VALUES
+    (484, 'RECEIVE_SERIAL', oils_i18n_gettext(484, 'Receive serial items', 'ppl', 'description'));
+
+COMMIT;