[open-ils-commits] [GIT] Evergreen ILS branch master updated. bac7117652853b4957b0e52eff49aabfa7660621
Evergreen Git
git at git.evergreen-ils.org
Thu May 19 10:50:32 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via bac7117652853b4957b0e52eff49aabfa7660621 (commit)
via ec45ea05739ec350ed688fcf8e28781e696819f4 (commit)
from 3232fbd8864ae988fb16fdce1fcbd46a32a158ae (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bac7117652853b4957b0e52eff49aabfa7660621
Merge: 3232fbd ec45ea0
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Thu May 19 10:49:44 2011 -0400
Merge branch 'user/senator/lp-784062' of git.evergreen-ils.org:working/Evergreen
commit ec45ea05739ec350ed688fcf8e28781e696819f4
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Wed May 18 17:26:58 2011 -0400
Add permission checking for updating and deleting volumes.
This addresses LP #784062 reported by Ben Shum, and I think others?
Creating volumes was already covered. The ability to delete volumes
without permission would be less often an issue in practice since you
would need permission to delete the volume's copies before you could
delete the volume itself.
Anyway, this should square things.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
index 152bb50..974390e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm
@@ -868,6 +868,8 @@ sub fleshed_volume_update {
if( $vol->isdeleted ) {
$logger->info("vol-update: deleting volume");
+ return $editor->event unless
+ $editor->allowed('UPDATE_VOLUME', $vol->owning_lib);
my $cs = $editor->search_asset_copy(
{ call_number => $vol->id, deleted => 'f' } );
return OpenILS::Event->new(
@@ -912,6 +914,9 @@ sub update_volume {
my $evt;
my $merge_vol;
+ return {evt => $editor->event} unless
+ $editor->allowed('UPDATE_VOLUME', $vol->owning_lib);
+
return {evt => $evt}
if ( $evt = OpenILS::Application::Cat::AssetCommon->org_cannot_have_vols($editor, $vol->owning_lib) );
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/Application/Cat.pm | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list