[open-ils-commits] r9452 - in trunk/Open-ILS/src:
perlmods/OpenILS/Application/Cat sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 25 17:12:43 EDT 2008
Author: erickson
Date: 2008-04-25 16:33:10 -0400 (Fri, 25 Apr 2008)
New Revision: 9452
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
forward-porting merge_bib_records perm and adding it to the seed data
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-04-25 20:29:24 UTC (rev 9451)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-04-25 20:33:10 UTC (rev 9452)
@@ -38,6 +38,10 @@
sub merge_records {
my( $editor, $master, $records ) = @_;
+ # bib records are global objects, so no org context required.
+ return (undef, $editor->die_event)
+ unless $editor->allowed('MERGE_BIB_RECORDS');
+
my $vol;
my $evt;
@@ -133,7 +137,7 @@
$record->deleted('f');
$record->editor($reqr->id);
$record->edit_date('now');
- $editor->update_biblio_record_entry($record, {checkperm => 1})
+ $editor->update_biblio_record_entry($record)
or return $editor->die_event;
}
@@ -142,7 +146,7 @@
$record->deleted('t');
$record->editor($reqr->id);
$record->edit_date('now');
- $editor->update_biblio_record_entry($record, {checkperm => 1})
+ $editor->update_biblio_record_entry($record)
or return $editor->die_event;
}
}
@@ -216,7 +220,6 @@
$_->deleted('t');
$_->editor($editor->requestor->id);
$_->edit_date('now');
- return (undef,$editor->die_event) unless $editor->allowed('UPDATE_VOLUME', $_->owning_lib);
$editor->update_asset_call_number($_) or return (undef, $editor->die_event);
merge_volume_holds($editor, $bigcn, $_->id);
}
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-04-25 20:29:24 UTC (rev 9451)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-04-25 20:33:10 UTC (rev 9452)
@@ -1102,6 +1102,7 @@
INSERT INTO permission.perm_list (code) VALUES ('UPDATE_VOLUME_NOTE');
INSERT INTO permission.perm_list (code) VALUES ('UPDATE_VR_FORMAT');
INSERT INTO permission.perm_list (code) VALUES ('UPDATE_XML_TRANSFORM');
+INSERT INTO permission.perm_list (code) VALUES ('MERGE_BIB_RECORDS');
INSERT INTO permission.grp_tree (id, name, parent, description, perm_interval, usergroup, application_perm) VALUES
More information about the open-ils-commits
mailing list