@@ -, +, @@
---
..._21082-add_option_for_overdrive_patron_auth.perl | 16 ++++++++++++++++
installer/data/mysql/kohastructure.sql | 12 ++++++++++++
installer/data/mysql/sysprefs.sql | 1 +
.../modules/admin/preferences/enhanced_content.pref | 21 +++++++++++++++++----
4 files changed, 46 insertions(+), 4 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_21082-add_option_for_overdrive_patron_auth.perl
--- a/installer/data/mysql/atomicupdate/bug_21082-add_option_for_overdrive_patron_auth.perl
+++ a/installer/data/mysql/atomicupdate/bug_21082-add_option_for_overdrive_patron_auth.perl
@@ -0,0 +1,16 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do('DROP TABLE IF EXISTS branches_overdrive');
+ $dbh->do( q|
+ CREATE TABLE IF NOT EXISTS branches_overdrive (
+ `branchcode` VARCHAR( 10 ) NOT NULL ,
+ `authname` VARCHAR( 255 ) NOT NULL ,
+ PRIMARY KEY (`branchcode`) ,
+ CONSTRAINT `branches_overdrive_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
+ ) ENGINE = INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci |);
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OverDriveAuthname', '', 'Authname for OverDrive Patron Authentication, will be used as fallback if individual branch authname not set', NULL, 'Free');");
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OverDriveWebsiteID','', 'WebsiteID provided by OverDrive', NULL, 'Free');");
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OverDrivePasswordRequired','', 'Does the library require passwords for OverDrive SIP authentication', NULL, 'YesNo');");
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 21082 - Add overdrive patron auth method)\n";
+}
--- a/installer/data/mysql/kohastructure.sql
+++ a/installer/data/mysql/kohastructure.sql
@@ -272,6 +272,18 @@ CREATE TABLE `branches` ( -- information about your libraries or branches are st
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
+-- Table structure for table `branches_overdrive`
+--
+
+DROP TABLE IF EXISTS `branches_overdrive`;
+CREATE TABLE IF NOT EXISTS branches_overdrive (
+ `branchcode` VARCHAR( 10 ) NOT NULL ,
+ `authname` VARCHAR( 255 ) NOT NULL ,
+ PRIMARY KEY (`branchcode`) ,
+ CONSTRAINT `branches_overdrive_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+--
-- Table structure for table `browser`
--
DROP TABLE IF EXISTS `browser`;
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -420,6 +420,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OverDriveClientKey','','Client key for OverDrive integration','30','Free'),
('OverDriveClientSecret','','Client key for OverDrive integration','30','YesNo'),
('OverDriveLibraryID','','Library ID for OverDrive integration','','Integer'),
+('OverDrivePasswordRequired','',NULL,'Does the library require passwords for OverDrive SIP authentication','YesNo'),
('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'),
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref
@@ -351,6 +351,14 @@ Enhanced Content:
- pref: OverDriveClientSecret
- .
-
+ - "Authenticate using OverDrive website id #"
+ - pref: OverDriveWebsiteID
+ - .
+ -
+ - "Authenticate using OverDrive Authname"
+ - pref: OverDriveAuthName
+ - "(will be used as fallback if individual branch authname not set here)."
+ -
- "Show items from the OverDrive catalog of library #"
- pref: OverDriveLibraryID
- .
@@ -359,10 +367,15 @@ Enhanced Content:
choices:
yes: Enable
no: "Don't enable"
- - users to access their OverDrive circulation history, and circulate items.
- - If you enable access, you must register auth return url of
- - http(s)://my.opac.hostname/cgi-bin/koha/external/overdrive/auth.pl
- - with OverDrive.
+ - users to access their OverDrive circulation history, and circulate items.
+ - A password is
+ - pref: OverDrivePasswordRequired
+ choices:
+ yes: Required
+ no: Not required
+ - for user access to OverDrive.
+ - If you enable access you must have a SIP connection registered with
+ - OverDrive for patron authentication against Koha
RecordedBooks:
-
- Include RecordedBooks availability information with the client secret
--