Bugzilla – Attachment 129517 Details for
Bug 29887
Create system preference IndependentBranchesLoggedInLibrary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29887: Add system preference IndependentBranchesLoggedInLibrary
Bug-29887-Add-system-preference-IndependentBranche.patch (text/plain), 8.56 KB, created by
Lucas Gass (lukeg)
on 2022-01-14 22:17:46 UTC
(
hide
)
Description:
Bug 29887: Add system preference IndependentBranchesLoggedInLibrary
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-01-14 22:17:46 UTC
Size:
8.56 KB
patch
obsolete
>From e06ea80b14624e9df37b9456b8f4cfe0d123be11 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 14 Jan 2022 21:37:49 +0000 >Subject: [PATCH] Bug 29887: Add system preference > IndependentBranchesLoggedInLibrary > >To test: >1. Have a user who has staff access and circulate privileges but is not a super librarian >2. Apply the patches and run updatedatabase.pl >3. From a superlibrarian account enable IndependentBranches and IndependentBranchesLoggedInLibrary set to Yes. >4. Also turn on the system preference 'CircSidebar' >5. Prepare to login as the non-superlibrarian user. Before logging on notice on auth.tt there is no dropdown allowing you to choose a branch. >6. Log in as the non-superlibrarian. >7. In the top left hand corner notice you are logged in under that users homebranch. >8. Click the dropdown, there is no link for 'Set library'. >9. Go to circulation-home.pl, there is no link for 'Set library' under the heading 'Circulation' >10. With 'CircSidebar' turned on look at the left navigation bar on some of the circulation pages ( Holds queue, Holds to pull, Holds awaiting pickup ). There should be no 'Set library' link on any of these pages. >11. Direct your browser to /cgi-bin/koha/circ/set-library.pl and notice there is no option to change your logged in branch >12. From a superlibrarian account, Turn off IndependentBranches but leave IndependentBranchesLoggedInLibrary set to Yes. >13. Repeat steps 5-11. Nothing should change, the non-superlibrarian should still see no 'Set library' links. >14. From a superlibrarian account, Turn on IndependentBranches and IndependentBranchesLoggedInLibrary set to No >15. Going through steps 5-11 again the non-superlibrarian should see all of the 'Set library' links and be able to successfully switch branches >--- > installer/data/mysql/mandatory/sysprefs.sql | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 2 +- > .../prog/en/modules/admin/preferences/admin.pref | 7 +++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 2 +- > .../intranet-tmpl/prog/en/modules/circ/circulation-home.tt | 3 +-- > .../intranet-tmpl/prog/en/modules/circ/set-library.tt | 2 +- > 7 files changed, 13 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 4c69c05c13..d8b78fed21 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -266,6 +266,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'), > ('IndependentBranchesPatronModifications','0', NULL, 'Show only modification request for the logged in branch','YesNo'), > ('IndependentBranchesTransfers','0', NULL, 'Allow non-superlibrarians to transfer items between libraries','YesNo'), >+('IndependentBranchesLoggedInLibrary','0', NULL, 'Allow only superlibrarians the ability to set or change their logged in location','YesNo'), > ('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'), > ('RecordedBooksClientSecret','','30','Client key for RecordedBooks integration','Free'), > ('RecordedBooksDomain','','','RecordedBooks domain','Free'), >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 14931325fd..0e2af5664d 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('IndependentBranchesLoggedInLibrary') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] > [% 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..8239ac6784 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('IndependentBranchesLoggedInLibrary') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] > <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/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 3263d6d031..0bbf66f1c6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -123,6 +123,13 @@ Administration: > choices: > 1: "Yes" > 0: "No" >+ - >+ - "Prevent staff (but not superlibrarians) from setting or changing their logged in location:" >+ - pref: IndependentBranchesLoggedInLibrary >+ default: 0 >+ choices: >+ 1: "Yes" >+ 0: "No" > - > - "Prevent staff (but not superlibrarians) from transfering items to other libraries: " > - pref: IndependentBranchesTransfers >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >index 73b3761764..b6affdaa79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >@@ -75,7 +75,7 @@ > <input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" autocomplete="off" /> > </p> > >- [% UNLESS IndependentBranches %] >+ [% UNLESS Koha.Preference('IndependentBranchesLoggedInLibrary') %] > <p> > <label for="branch">Library:</label> > <select name="branch" id="branch" class="input" tabindex="3"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >index 2c67792c2b..69d29df949 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >@@ -39,7 +39,7 @@ > <li> > <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a> > </li> >- [% UNLESS IndependentBranches %] >+ [% IF !Koha.Preference('IndependentBranchesLoggedInLibrary') || CAN_user_superlibrarian %] > <li> > [% IF Koha.Preference('UseCirculationDesks') %] > <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a> >@@ -101,7 +101,6 @@ > [% END %] > > <h3>Transfers</h3> >- > <ul class="buttons-list"> > [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %] > <li> >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..ea3545e38e 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('IndependentBranchesLoggedInLibrary') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %] > <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 29887
:
129517
|
129518
|
130452
|
130674
|
130675
|
130676
|
131380
|
132353
|
132354
|
132355
|
132356