Bugzilla – Attachment 71091 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.56 KB, created by
Marcel de Rooy
on 2018-01-31 16:37:13 UTC
(
hide
)
Description:
Bug 20100: Introduce preference ProtectSuperlibPrivs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-01-31 16:37:13 UTC
Size:
3.56 KB
patch
obsolete
>From e9b421397ced2347032c1c6a7b32920b305ed310 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > 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 68881d0..246da17 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -438,6 +438,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'), > ('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'), > ('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'), > ('QueryStemming','1',NULL,'If ON, enables query stemming','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 fe4da67..713b5ef 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 >@@ -205,6 +205,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