Bugzilla – Attachment 74618 Details for
Bug 20100
A non-superlibrarian should not be able to add superlibrarian privileges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20100: Introduce preference ProtectSuperlibPrivs
Bug-20100-Introduce-preference-ProtectSuperlibPriv.patch (text/plain), 3.67 KB, created by
Nick Clemens
on 2018-04-20 11:54:40 UTC
(
hide
)
Description:
Bug 20100: Introduce preference ProtectSuperlibPrivs
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-04-20 11:54:40 UTC
Size:
3.67 KB
patch
obsolete
>From a7cfbaa8cd29f0e174b4362cc71b96f04b9855d8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 31 Jan 2018 16:23:18 +0100 >Subject: [PATCH] Bug 20100: Introduce preference ProtectSuperlibPrivs > >This pref allows you to block changes to superlibrarian privileges at >client and server side for non-superlibrarians. >This patch only contains the db rev and the preference description. > >Test plan: >Run dbrev or new install. Check pref value. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > installer/data/mysql/atomicupdate/bug_20100.perl | 9 +++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 7 +++++++ > 3 files changed, 17 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_20100.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_20100.perl b/installer/data/mysql/atomicupdate/bug_20100.perl >new file mode 100644 >index 0000000..937656a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20100.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( q| >+INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( '0', 'ProtectSuperlibPrivs', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' ); >+ |); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 20100: Should a non-superlibrarian be able to add superlibrarian privileges?)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index ad8f41d..e8c9842 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -442,6 +442,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('printcirculationslips','1','','If ON, enable printing circulation receipts','YesNo'), > ('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'), > ('ProcessingFeeNote', '', NULL, 'Set the text to be recorded in the column note, table accountlines when the processing fee (defined in item type) is applied', 'textarea'), >+('ProtectSuperlibPrivs','0',NULL,'If enabled, non-superlibrarians cannot set superlibrarian privileges','YesNo'), > ('PurgeSuggestionsOlderThan', '', NULL, 'If this script is called without the days parameter', 'Integer'), > ('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'), > ('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index f1af818..f484df4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -199,6 +199,13 @@ Patrons: > - pref: FailedLoginAttempts > class: integer > - failed login attempts. >+ - >+ - pref: ProtectSuperlibPrivs >+ choices: >+ yes: Allow only superlibrarians >+ no: Do not block permitted non-superlibrarians >+ - to access/change superlibrarian privileges. >+ > "Norwegian patron database": > - > - pref: NorwegianPatronDBEnable >-- >2.1.4
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 20100
:
71091
|
71092
|
71093
|
71918
|
72260
|
72261
|
72262
|
72747
|
72749
|
72750
| 74618 |
74619
|
74620
|
74621
|
74721
|
74840
|
74841
|
74844
|
74846