Bugzilla – Attachment 18046 Details for
Bug 10079
HomeOrHoldingBranch should not control who can delete when IndependantBranches is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 10079 - HomeOrHoldingBranch should not control who can delete when IndependantBranches is enabled
SIGNED-OFF-Bug-10079---HomeOrHoldingBranch-should-.patch (text/plain), 1.53 KB, created by
Owen Leonard
on 2013-05-09 15:42:48 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10079 - HomeOrHoldingBranch should not control who can delete when IndependantBranches is enabled
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-05-09 15:42:48 UTC
Size:
1.53 KB
patch
obsolete
>From 105136250c6fbae292f2ebfa7770a35ca6a375cb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 19 Apr 2013 10:21:43 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 10079 - HomeOrHoldingBranch should not > control who can delete when IndependantBranches is enabled >Content-Type: text/plain; charset="utf-8" > >Test Plan: >1) Enable IndependantBranches >2) Set HomeOrHoldingBranch to holding branch >3) Delete an item whose holding branch is your logged in branch, and > whose home branch is not >4) Apply this patch >5) Repeat step 3, it should fail >6) Try to delete another items whose home branch is your logged in > branch, and whose holding branch is a different branch. This > deletetion should succeed. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Items.pm | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index d9c31f9..9283b5c 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2213,10 +2213,9 @@ sub DelItemCheck { > if ($onloan){ > $error = "book_on_loan" > } >- elsif ( !(C4::Context->userenv->{flags} & 1) and >- C4::Context->preference("IndependantBranches") and >- (C4::Context->userenv->{branch} ne >- $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) ) >+ elsif ( !( C4::Context->userenv->{flags} & 1 ) >+ and C4::Context->preference("IndependantBranches") >+ and ( C4::Context->userenv->{branch} ne $item->{'homebranch'} ) ) > { > $error = "not_same_branch"; > } >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10079
:
17554
|
18046
|
18098