Bugzilla – Attachment 74840 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: (QA follow-up) Change syspref name to full version
Bug-20100-QA-follow-up-Change-syspref-name-to-full.patch (text/plain), 4.76 KB, created by
Marcel de Rooy
on 2018-04-25 11:57:22 UTC
(
hide
)
Description:
Bug 20100: (QA follow-up) Change syspref name to full version
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-04-25 11:57:22 UTC
Size:
4.76 KB
patch
obsolete
>From dce1ed7d97bc291184330e15f8025cb3024b01de Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 25 Apr 2018 13:09:05 +0200 >Subject: [PATCH] Bug 20100: (QA follow-up) Change syspref name to full version >Content-Type: text/plain; charset=utf-8 > >As per RM request, changing the shorter name to its full form. >Result of a git grep | sed. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >No occurrences to be found anymore with git grep -i. >--- > installer/data/mysql/atomicupdate/bug_20100.perl | 2 +- > installer/data/mysql/sysprefs.sql | 2 +- > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 2 +- > members/member-flags.pl | 4 ++-- > 4 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_20100.perl b/installer/data/mysql/atomicupdate/bug_20100.perl >index 937656a..b6c5f61 100644 >--- a/installer/data/mysql/atomicupdate/bug_20100.perl >+++ b/installer/data/mysql/atomicupdate/bug_20100.perl >@@ -1,7 +1,7 @@ > $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' ); >+INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( '0', 'ProtectSuperlibrarianPrivileges', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' ); > |); > > SetVersion( $DBversion ); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index f951ea4..74c5ced 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -443,7 +443,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'), >+('ProtectSuperlibrarianPrivileges','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 f484df4..ad50390 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 >@@ -200,7 +200,7 @@ Patrons: > class: integer > - failed login attempts. > - >- - pref: ProtectSuperlibPrivs >+ - pref: ProtectSuperlibrarianPrivileges > choices: > yes: Allow only superlibrarians > no: Do not block permitted non-superlibrarians >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 3a0155e..04582ea 100755 >--- a/members/member-flags.pl >+++ b/members/member-flags.pl >@@ -84,7 +84,7 @@ if ($input->param('newflags')) { > } > > $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?"); >- if( !C4::Context->preference('ProtectSuperlibPrivs') || C4::Context->IsSuperLibrarian ) { >+ if( !C4::Context->preference('ProtectSuperlibrarianPrivileges') || C4::Context->IsSuperLibrarian ) { > $sth->execute($module_flags, $member); > } else { > my $old_flags = $patron->flags // 0; >@@ -206,7 +206,7 @@ $template->param( > loop => \@loop, > csrf_token => > Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), >- disable_superlibrarian_privs => C4::Context->preference('ProtectSuperlibPrivs') ? !C4::Context->IsSuperLibrarian : 0, >+ disable_superlibrarian_privs => C4::Context->preference('ProtectSuperlibrarianPrivileges') ? !C4::Context->IsSuperLibrarian : 0, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >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