[open-ils-commits] r9451 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 25 17:08:58 EDT 2008
Author: erickson
Date: 2008-04-25 16:29:24 -0400 (Fri, 25 Apr 2008)
New Revision: 9451
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
Log:
The ability to perform record merges is now controlled by a single
permission and not individual perms on volumes/copies that may have to
be updated as part of the merge.
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-04-24 20:39:34 UTC (rev 9450)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-04-25 20:29:24 UTC (rev 9451)
@@ -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);
}
More information about the open-ils-commits
mailing list