Bugzilla – Attachment 103099 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.73 KB, created by
Agustín Moyano
on 2020-04-16 21:15:49 UTC
(
hide
)
Description:
Bug 23816: Update kohastructure and atomic update
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-04-16 21:15:49 UTC
Size:
2.73 KB
patch
obsolete
>From 28e6e893694df29d1c93263752411857dcf4ecd3 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 > >--- > 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 97801a50e2..609953dbfe 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -324,6 +324,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.25.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