Bugzilla – Attachment 132353 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), 5.89 KB, created by
Lucas Gass
on 2022-03-28 17:10:36 UTC
(
hide
)
Description:
Bug 29887: Add system preference IndependentBranchesLoggedInLibrary
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2022-03-28 17:10:36 UTC
Size:
5.89 KB
patch
obsolete
>From 9cd7b0f3b17ae20c32d20fe25da6ebb67c164625 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 > >Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> >--- > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../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 +-- > 4 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index deaf6b6fc2..fcd7ef0969 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -267,6 +267,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/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 2eab55ae03..858bbd57be 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 >@@ -131,6 +131,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 499c5bdbd3..88bceca4a0 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 55a314e160..5c826bcbb3 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> >@@ -113,7 +113,6 @@ > [% END %] > > <h3>Transfers</h3> >- > <ul class="buttons-list"> > [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %] > <li> >-- >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