Bugzilla – Attachment 131090 Details for
Bug 30178
Every librarian can edit every item with IndependentBranches on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SOLVED] Every librarian can edit every item with IndependentBranches on
0001-Bug-30178-Every-librarian-can-edit-every-item-with-I.patch (text/plain), 1.98 KB, created by
Janusz Kaczmarek
on 2022-02-24 20:55:11 UTC
(
hide
)
Description:
[SOLVED] Every librarian can edit every item with IndependentBranches on
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2022-02-24 20:55:11 UTC
Size:
1.98 KB
patch
obsolete
>From c4712e867564b4461f3948e2e2b0bc9d02a0c430 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Thu, 24 Feb 2022 21:26:46 +0100 >Subject: [PATCH] Bug 30178: Every librarian can edit every item with > IndependentBranches on > >Problem arises after applying bugfix #27526: with IndependentBranches on, >a librarian without superlibrarian privileges, can edit every item >(i.e. also from a foreign branch). This is because can_be_edited >calculation is buggy. > >Test plan: >========= >1. Have (at least) two branches defined. >2. Have IndependentBranches set. >3. Have a biblio record with items belonging to different branches. >4. Be a librarian without superlibrarian rights. >5. Go to Edit -> Edit items view (cataloguing/additems.pl). >6. You will be able to edit every item, also ones not from the branch > you are from. >7. Apply the patch. >8. Repeat 5. >9. You should be able to edit only the items from your branch. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 825e4c1c3a..aa02320f52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -80,7 +80,7 @@ > </thead> > <tbody> > [% FOREACH item IN items %] >- [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchcode() ) %] >+ [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %] > [% IF item.itemnumber == itemnumber%] > [% UNLESS can_be_edited %] > <tr id="row[% item.itemnumber | html %]" class="active"> >-- >2.30.2 >
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 30178
:
131090
|
131123
|
131137
|
131182