Bugzilla – Attachment 108554 Details for
Bug 23816
Allow to have different password strength and length settings for different patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23816: Update kohastructure and atomic update
Bug-23816-Update-kohastructure-and-atomic-update.patch (text/plain), 2.90 KB, created by
Katrin Fischer
on 2020-08-18 21:24:35 UTC
(
hide
)
Description:
Bug 23816: Update kohastructure and atomic update
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-18 21:24:35 UTC
Size:
2.90 KB
patch
obsolete
>From 3cc5c99894ab46fe5bc4d253225cbfe4b217f6a9 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Wed, 15 Apr 2020 16:12:16 -0300 >Subject: [PATCH] Bug 23816: Update kohastructure and atomic update > >Sponsored-by: Northeast Kansas Library - NEKLS > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > installer/data/mysql/atomicupdate/bug_23816.perl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 16 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_23816.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_23816.perl b/installer/data/mysql/atomicupdate/bug_23816.perl >new file mode 100644 >index 0000000000..6266f46bf1 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23816.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ # you can use $dbh here like: >+ # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); >+ if( !column_exists( 'categories', 'min_password_length' ) ) { >+ $dbh->do("ALTER TABLE categories ADD COLUMN `min_password_length` smallint(6) NULL DEFAULT NULL AFTER `change_password` -- set minimum password length for patrons in this category"); >+ } >+ if( !column_exists( 'categories', 'require_strong_password' ) ) { >+ $dbh->do("ALTER TABLE categories ADD COLUMN `require_strong_password` TINYINT(1) NULL DEFAULT NULL AFTER `min_password_length` -- set required password strength for patrons in this category"); >+ } >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 23816, "Add min_password_length and require_strong_password columns in categories table"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 35c643fa38..cc70b87203 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -327,6 +327,8 @@ CREATE TABLE `categories` ( -- this table shows information related to Koha patr > `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'. > `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow, > `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC >+ `min_password_length` smallint(6) NULL DEFAULT NULL, -- set minimum password length for patrons in this category >+ `require_strong_password` TINYINT(1) NULL DEFAULT NULL, -- set required password strength for patrons in this category > PRIMARY KEY (`categorycode`), > UNIQUE KEY `categorycode` (`categorycode`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.11.0
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 23816
:
103099
|
103100
|
103101
|
103102
|
103103
|
103104
|
103108
|
103109
|
103110
|
103111
|
103112
|
103113
|
103805
|
103806
|
103807
|
103808
|
103809
|
103810
|
107158
|
107159
|
107160
|
107161
|
107162
|
107163
|
108554
|
108555
|
108556
|
108557
|
108558
|
108559
|
108571
|
108572
|
109243
|
109244
|
109245
|
109249
|
109250
|
109251
|
109252
|
109253
|
109254
|
109255
|
109256
|
109257
|
109520
|
109521
|
109522
|
109523
|
109524
|
109525
|
109526
|
109527
|
109528
|
109833
|
109834