Bugzilla – Attachment 160122 Details for
Bug 35617
Make phone number as match point in in Identity providers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35617: Extending the matchpoint in "identity_providers" by phone number
Bug-35617-Extending-the-matchpoint-in-identityprov.patch (text/plain), 4.66 KB, created by
Slava Shishkin
on 2023-12-20 15:02:44 UTC
(
hide
)
Description:
Bug 35617: Extending the matchpoint in "identity_providers" by phone number
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2023-12-20 15:02:44 UTC
Size:
4.66 KB
patch
obsolete
>From 3c7ae06bcc4310ad2ca135d3e4f445a9f2b0fefd Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Wed, 25 Oct 2023 19:55:02 +0300 >Subject: [PATCH] Bug 35617: Extending the matchpoint in "identity_providers" > by phone number > >Update identity_providers to include 'phone' as a matchpoint, >also as option in the dropdown menu. Further when authentication >phase 'phone' will be used as the matchpoint like email, userid, >or cardnumber. >--- > .../definitions/identity_provider.yaml | 1 + > .../atomicupdate/extend_identity_providers.pl | 23 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > .../en/modules/admin/identity_providers.tt | 6 +++++ > 4 files changed, 31 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/extend_identity_providers.pl > >diff --git a/api/v1/swagger/definitions/identity_provider.yaml b/api/v1/swagger/definitions/identity_provider.yaml >index c9fc649d42..4a79ebfb97 100644 >--- a/api/v1/swagger/definitions/identity_provider.yaml >+++ b/api/v1/swagger/definitions/identity_provider.yaml >@@ -29,6 +29,7 @@ properties: > type: string > enum: > - email >+ - phone > - userid > - cardnumber > config: >diff --git a/installer/data/mysql/atomicupdate/extend_identity_providers.pl b/installer/data/mysql/atomicupdate/extend_identity_providers.pl >new file mode 100644 >index 0000000000..222529ff8a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/extend_identity_providers.pl >@@ -0,0 +1,23 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "35617", >+ description => "Extend matchpoint in identity_providers", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ # now is `matchpoint` enum('email','phone','userid','cardnumber') NOT NULL COMMENT >+ $dbh->do(q{ >+ ALTER TABLE `identity_providers` >+ MODIFY COLUMN `matchpoint` enum('email','phone','userid','cardnumber') NOT NULL COMMENT 'The field of the patron that will be used to match the user from the identity provider'; >+ >+ }); >+ >+ # Print useful stuff here >+ # tables >+ say $out "Extend 'matchpoint' field in 'identity_providers'"; >+ >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 0b59ad8d85..c7f276465c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3546,7 +3546,7 @@ CREATE TABLE `identity_providers` ( > `protocol` enum('OAuth','OIDC','LDAP','CAS') NOT NULL COMMENT 'Protocol provider speaks', > `config` longtext NOT NULL COMMENT 'Configuration of the provider in JSON format', > `mapping` longtext NOT NULL COMMENT 'Configuration to map provider data to Koha user', >- `matchpoint` enum('email','userid','cardnumber') NOT NULL COMMENT 'The patron attribute to be used as matchpoint', >+ `matchpoint` enum('email','phone','userid','cardnumber') NOT NULL COMMENT 'The patron attribute to be used as matchpoint', > `icon_url` varchar(255) DEFAULT NULL COMMENT 'Provider icon URL', > PRIMARY KEY (`identity_provider_id`), > UNIQUE KEY `code` (`code`), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt >index 95c56756ce..d0dcba6299 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt >@@ -149,6 +149,7 @@ > <label for="matchpoint">Matchpoint: </label> > <select name="matchpoint" id="matchpoint"> > <option value="email">Email</option> >+ <option value="phone">Phone</option> > <option value="userid">User ID</option> > <option value="cardnumber">Card number</option> > </select> >@@ -317,6 +318,11 @@ > [%- ELSE -%] > <option value="email">Email</option> > [%- END -%] >+ [%- IF identity_provider.matchpoint == 'phone' -%] >+ <option value="phone" selected="selected">Phone</option> >+ [%- ELSE -%] >+ <option value="phone">Phone</option> >+ [%- END -%] > [%- IF identity_provider.matchpoint == 'userid' -%] > <option value="userid" selected="selected">User id</option> > [%- ELSE -%] >-- >2.43.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 35617
: 160122