Bugzilla – Attachment 5857 Details for
Bug 6885
Superlibrarian users can't delete items from another library when IndependantBranches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6885 Allow superlib to delete items from any library
Bug-6885-Allow-superlib-to-delete-items-from-any-l.patch (text/plain), 1.73 KB, created by
Paul Poulain
on 2011-10-12 15:07:50 UTC
(
hide
)
Description:
Bug 6885 Allow superlib to delete items from any library
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-10-12 15:07:50 UTC
Size:
1.73 KB
patch
obsolete
>From 8038a234adbb2868e723be4df84691803613cd63 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Mon, 19 Sep 2011 19:53:38 +0200 >Subject: [PATCH] Bug 6885 Allow superlib to delete items from any library > >When IndependantBranches syspref is enabled, a 'regular' user can only >delete items belonging to his/her library. But a superlibrarian should >have the permission to delete items from all libraries. He can't for the >time being. This is fix by this patch. > >How to test? > >- On a multi-libraries Koha, activate IndependantBranches >- Log in with a superlibrarian user >- Find a biblio with one item from another library than the user home > library >- Click on Edit > Edit Items >- On the list of items, all lines have Delete link >- If you try to delete an item from another library than the user home > library, deletion will fail. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> >--- > C4/Items.pm | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 2e85130..8781c7d 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2103,7 +2103,11 @@ sub DelItemCheck { > if ($onloan) { > $error = "book_on_loan"; > } >- elsif (C4::Context->preference("IndependantBranches") and (C4::Context->userenv->{branch} ne $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'})){ >+ elsif ( C4::Context->userenv->{flags} % 2 != 1 and >+ C4::Context->preference("IndependantBranches") and >+ (C4::Context->userenv->{branch} ne >+ $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) ) >+ { > $error = "not_same_branch"; > } > else { >-- >1.7.4.1
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 6885
:
5460
|
5771
|
5839
|
5857
|
7039
|
7046
|
7047