Bugzilla – Attachment 167981 Details for
Bug 33462
Force password change for new patrons entered by staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33462: DB Updates
Bug-33462-DB-Updates.patch (text/plain), 3.66 KB, created by
Sam Lau
on 2024-06-21 18:29:23 UTC
(
hide
)
Description:
Bug 33462: DB Updates
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-06-21 18:29:23 UTC
Size:
3.66 KB
patch
obsolete
>From 5207164278358f7602bec7818330faf29cad721f Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Thu, 6 Jun 2024 18:52:13 +0000 >Subject: [PATCH] Bug 33462: DB Updates > >--- > .../data/mysql/atomicupdate/bug_33462.pl | 23 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > .../en/modules/admin/preferences/patrons.pref | 8 ++++++- > 3 files changed, 31 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_33462.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33462.pl b/installer/data/mysql/atomicupdate/bug_33462.pl >new file mode 100755 >index 0000000000..d74effdfec >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33462.pl >@@ -0,0 +1,23 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "33462", >+ description => "Force password reset for new patrons entered by staff", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) >+VALUES ('ForcePasswordResetWhenSetByStaff', '0', NULL,'Force a staff created patron account to reset its password after its first OPAC login.', 'YesNo') >+ }); >+ say $out "Added new system preference 'ForcePasswordResetWhenSetByStaff'"; >+ >+ if( !column_exists( 'categories', 'force_password_reset_when_set_by_staff' ) ) { >+ $dbh->do("ALTER TABLE categories ADD COLUMN `force_password_reset_when_set_by_staff` TINYINT(1) NULL DEFAULT NULL AFTER `require_strong_password` -- if patrons of this category are required to reset password after being created by a staff member"); >+ } >+ >+ say $out "Added column to categories 'force_password_reset_when_set_by_staff'"; >+ >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 14cef909b3..c0784c492a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1806,6 +1806,7 @@ CREATE TABLE `categories` ( > `min_password_length` smallint(6) DEFAULT NULL COMMENT 'set minimum password length for patrons in this category', > `require_strong_password` tinyint(1) DEFAULT NULL COMMENT 'set required password strength for patrons in this category', > `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude patrons of this category from local holds priority', >+ `force_password_reset_when_set_by_staff` tinyint(1) DEFAULT NULL COMMENT 'if patrons of this category are required to reset password after being created by a staff member', > PRIMARY KEY (`categorycode`), > UNIQUE KEY `categorycode` (`categorycode`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >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 d2976e2d43..6d8ccf1183 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 >@@ -1,4 +1,4 @@ >-Patrons: >+fPatrons: > General: > - > - pref: CheckPrevCheckout >@@ -472,6 +472,12 @@ Patrons: > - pref: FailedLoginAttempts > class: integer > - failed login attempts. >+ - >+ - pref: ForcePasswordResetWhenSetByStaff >+ choices: >+ 1: "Force" >+ 0: "Don't force" >+ - a staff created patron account to reset its password after its first OPAC login. > - > - pref: Pseudonymization > choices: >-- >2.39.2
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 33462
:
153687
|
153688
|
153689
|
154395
|
154396
|
154397
|
167582
|
167583
|
167584
|
167585
|
167586
|
167587
|
167981
|
167982
|
167983
|
167984
|
167985
|
167986
|
168413
|
168414
|
168415
|
168416
|
168417
|
168418
|
168452
|
168453
|
168454
|
168455
|
168456
|
168457
|
171634
|
171635
|
171636
|
171637
|
171638
|
171639
|
171640
|
172030
|
172031
|
172032
|
172033
|
172034
|
172035
|
172036
|
172064
|
172065
|
172066
|
172067
|
172068
|
172069
|
172070
|
172071
|
173864
|
173865