Bugzilla – Attachment 132352 Details for
Bug 30387
IndependentBranches allows users to change libraries when they should not be able to
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30387: Only allow superlibrarians to set library with IndependentBranches enabled
Bug-30387-Only-allow-superlibrarians-to-set-librar.patch (text/plain), 4.22 KB, created by
Lucas Gass (lukeg)
on 2022-03-28 16:59:57 UTC
(
hide
)
Description:
Bug 30387: Only allow superlibrarians to set library with IndependentBranches enabled
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-03-28 16:59:57 UTC
Size:
4.22 KB
patch
obsolete
>From 877187b21a4412e8cfec4a656147b1115c8b61e3 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 28 Mar 2022 16:43:17 +0000 >Subject: [PATCH] Bug 30387: Only allow superlibrarians to set library with > IndependentBranches enabled > >To test: >1. Turn on IndependentBranches. >2. Give a staff member editcatalogue permissions but not superlibrarian permissions. >3. Once logged in as that staff member click on the name in the top right corner, notice that the 'Set library' button is there. >4. Turn on the CircSidebar system preference and go to any page that includes the CircSidebar. ( returns.tt, circulation,tt ). Notcie the Set library button is visibile. >5. Go to '/cgi-bin/koha/circ/set-library.pl', notice you can set your library to something else. >6. Apply patch >7. Again with the staff member who has editcatalogue permissions but not superlibrarian permissions try steps 3-5. This time you should not see the 'Set library' links. On '/cgi-bin/koha/circ/set-library.pl' you should not be able to change your library. >8. With a superlibrarian try steps 3-5, you should see the 'Set library' links and on '/cgi-bin/koha/circ/set-library.pl' you should be able to set your library >9. Turn on 'UseCirculationDesks'. >10. When repeating 3-5 make sure you can see only the 'Set desk' links while logged in as the non-superlibrarian. On '/cgi-bin/koha/circ/set-library.pl' you should only be able to 'Set desk'. >11. Now with a staff member who has neither superlibrarian permissions OR editcatalogue permissions do steps 3-5. You should NOT see the 'Set library links' but you should see the 'Set desk' links. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc >index 99b882c76a..cc89395c76 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc >@@ -15,7 +15,7 @@ > [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %] > <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li> > [% END %] >- [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] >+ [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian ) %] > [% IF Koha.Preference('UseCirculationDesks') %] > <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a></li> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 754ac0d294..ffa8cb675b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -149,7 +149,7 @@ > </li> > [% END %] > >- [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] >+ [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian ) %] > <li role="separator" class="loggedin-menu-label divider"></li> > <li> > [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >index 040ff1de17..698507c9ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt >@@ -79,7 +79,7 @@ Updated:<ul> > [% ELSE %] > > <form method="post" action="set-library.pl"> >-[% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] >+[% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian ) %] > <fieldset class="rows"> > <legend>Set library</legend> > <ol> >-- >2.20.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 30387
:
132352
|
133990
|
134002