@@ -, +, @@ --- 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 --- a/installer/data/mysql/atomicupdate/bug_20100.perl +++ a/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"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -440,6 +440,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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/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 --