View | Details | Raw Unified | Return to bug 18314
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/lockout.perl (+19 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q|
4
        INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
5
        VALUES ('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer');
6
    |);
7
8
    unless( column_exists( 'borrowers', 'login_attempts' ) ) {
9
        $dbh->do(q|
10
            ALTER TABLE borrowers ADD COLUMN login_attempts INT(4) DEFAULT 0 AFTER lastseen
11
        |);
12
        $dbh->do(q|
13
            ALTER TABLE deletedborrowers ADD COLUMN login_attempts INT(4) DEFAULT 0 AFTER lastseen
14
        |);
15
    }
16
17
    SetVersion( $DBversion );
18
    print "Upgrade to $DBversion done (Bug XXXXX - Add FailedLoginAttempts and borrowers.login_attempts)\n";
19
}
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 631-636 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
631
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
631
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
632
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
632
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
633
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
633
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
634
  `login_attempts` int(4) default 0, -- number of failed login attemps
634
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
635
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
635
  KEY borrowernumber (borrowernumber),
636
  KEY borrowernumber (borrowernumber),
636
  KEY `cardnumber` (`cardnumber`),
637
  KEY `cardnumber` (`cardnumber`),
Lines 1657-1662 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1657
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
1658
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron if this item has previously been checked out to this patron if 'yes', not if 'no', defer to category setting if 'inherit'.
1658
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
1659
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
1659
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1660
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1661
  `login_attempts` int(4) default 0, -- number of failed login attemps
1660
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1662
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1661
  UNIQUE KEY `cardnumber` (`cardnumber`),
1663
  UNIQUE KEY `cardnumber` (`cardnumber`),
1662
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1664
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 156-161 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
156
('ExtendedPatronAttributes','0',NULL,'Use extended patron IDs and attributes','YesNo'),
156
('ExtendedPatronAttributes','0',NULL,'Use extended patron IDs and attributes','YesNo'),
157
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
157
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
158
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
158
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
159
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
159
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
160
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
160
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
161
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
161
('FineNotifyAtCheckin','0',NULL,'If ON notify librarians of overdue fines on the items they are checking in.','YesNo'),
162
('FineNotifyAtCheckin','0',NULL,'If ON notify librarians of overdue fines on the items they are checking in.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +5 lines)
Lines 212-214 Patrons: Link Here
212
               yes: Do
212
               yes: Do
213
               no: "Don't"
213
               no: "Don't"
214
         - search the Norwegian national patron database after a local search result was found.
214
         - search the Norwegian national patron database after a local search result was found.
215
- 
215
     -
216
         - Block a patron's account if it reaches
217
         - pref: FailedLoginAttempts
218
           class: integer
219
         - failed login attempts.

Return to bug 18314