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 632-637 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
632
  `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
  `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'.
633
  `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
  `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)
634
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
634
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
635
  `login_attempts` int(4) default 0, -- number of failed login attemps
635
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
636
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
636
  KEY borrowernumber (borrowernumber),
637
  KEY borrowernumber (borrowernumber),
637
  KEY `cardnumber` (`cardnumber`),
638
  KEY `cardnumber` (`cardnumber`),
Lines 1663-1668 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1663
  `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'.
1664
  `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'.
1664
  `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)
1665
  `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)
1665
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1666
  `lastseen` datetime default NULL, -- last time a patron has been seed (connected at the OPAC or staff interface)
1667
  `login_attempts` int(4) default 0, -- number of failed login attemps
1666
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1668
  `overdrive_auth_token` text default NULL, -- persist OverDrive auth token
1667
  UNIQUE KEY `cardnumber` (`cardnumber`),
1669
  UNIQUE KEY `cardnumber` (`cardnumber`),
1668
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1670
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 159-164 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
159
('ExtendedPatronAttributes','0',NULL,'Use extended patron IDs and attributes','YesNo'),
159
('ExtendedPatronAttributes','0',NULL,'Use extended patron IDs and attributes','YesNo'),
160
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
160
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
161
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
161
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
162
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
162
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
163
('FeeOnChangePatronCategory','1','','If set, when a patron changes to a category with enrolment fee, a fee is charged','YesNo'),
163
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
164
('FilterBeforeOverdueReport','0','','Do not run overdue report until filter selected','YesNo'),
164
('FineNotifyAtCheckin','0',NULL,'If ON notify librarians of overdue fines on the items they are checking in.','YesNo'),
165
('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