From 7a3c9951bb0daac178220a97f1a1d373c6036619 Mon Sep 17 00:00:00 2001 From: Brendan A Gallagher Date: Fri, 1 Apr 2016 19:46:47 +0000 Subject: [PATCH] DBRev Bug 10988 - Allow login via Google OAuth2 (OpenID Connect) Signed-off-by: Brendan A Gallagher --- Koha.pm | 2 +- .../data/mysql/atomicupdate/googleopenidconnect.sql | 5 ----- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/googleopenidconnect.sql diff --git a/Koha.pm b/Koha.pm index 54d28d6203..0f100f90e1 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "3.23.00.043"; +$VERSION = "3.23.00.044"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/googleopenidconnect.sql b/installer/data/mysql/atomicupdate/googleopenidconnect.sql deleted file mode 100644 index 2704bd1c7a..0000000000 --- a/installer/data/mysql/atomicupdate/googleopenidconnect.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES - ('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'), - ('GoogleOAuth2ClientID', '', NULL, 'Client ID for the web app registered with Google', 'Free'), - ('GoogleOAuth2ClientSecret', '', NULL, 'Client Secret for the web app registered with Google', 'Free'), - ('GoogleOpenIDConnectDomain', '', NULL, 'Restrict OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ff0ff94e56..6603453489 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12074,7 +12074,19 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.23.00.044"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q{ + INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES + ('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'), + ('GoogleOAuth2ClientID', '', NULL, 'Client ID for the web app registered with Google', 'Free'), + ('GoogleOAuth2ClientSecret', '', NULL, 'Client Secret for the web app registered with Google', 'Free'), + ('GoogleOpenIDConnectDomain', '', NULL, 'Restrict OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'); + }); + print "Upgrade to $DBversion done (Bug 10988 - Allow login via Google OAuth2 (OpenID Connect))\n"; + SetVersion($DBversion); +} # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5