Bugzilla – Attachment 86866 Details for
Bug 21890
Allow forgotten password functionality to be limited by patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21890: DB updates
Bug-21890-DB-updates.patch (text/plain), 2.69 KB, created by
Liz Rea
on 2019-03-21 19:51:06 UTC
(
hide
)
Description:
Bug 21890: DB updates
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-03-21 19:51:06 UTC
Size:
2.69 KB
patch
obsolete
>From 28b3664d30475820fa368771da5f422f3f14ceee Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 31 Jan 2019 16:25:59 -0300 >Subject: [PATCH] Bug 21890: DB updates > >This patch adds a new column to the categories table: >'reset_password' which is a boolean, and represents, well... that. The >value itself is nullable. > >The idea is that OpacResetPassword governs the general behaviour, and >this can be overriden at category-level. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > .../atomicupdate/bug_21890_pwd_reset_by_category.perl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 15 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_21890_pwd_reset_by_category.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_21890_pwd_reset_by_category.perl b/installer/data/mysql/atomicupdate/bug_21890_pwd_reset_by_category.perl >new file mode 100644 >index 0000000000..b2b6a38e43 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21890_pwd_reset_by_category.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ if ( !column_exists( 'categories', 'reset_password' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE categories >+ ADD COLUMN reset_password TINYINT(1) NULL DEFAULT NULL >+ AFTER checkprevcheckout >+ }); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 21890 - Patron password reset by category)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3b37e8cbf3..c1412b1aa7 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -318,6 +318,7 @@ CREATE TABLE `categories` ( -- this table shows information related to Koha patr > `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions > `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category > `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 > 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 21890
:
84595
|
84596
|
84597
|
84598
|
84631
|
84632
|
84633
|
84634
|
85001
|
85002
|
85003
|
85004
|
85005
|
85006
|
86843
|
86844
|
86845
|
86846
|
86847
|
86866
|
86867
|
86868
|
86869
|
86870
|
86911
|
87289
|
87290
|
87291
|
87292
|
87293
|
87294
|
87295