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

(-)a/api/v1/swagger/definitions/identity_provider.yaml (+1 lines)
Lines 29-34 properties: Link Here
29
    type: string
29
    type: string
30
    enum:
30
    enum:
31
      - email
31
      - email
32
      - phone
32
      - userid
33
      - userid
33
      - cardnumber
34
      - cardnumber
34
  config:
35
  config:
(-)a/installer/data/mysql/atomicupdate/extend_identity_providers.pl (+23 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35617",
5
    description => "Extend matchpoint in identity_providers",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        # now is `matchpoint` enum('email','phone','userid','cardnumber') NOT NULL COMMENT
12
        $dbh->do(q{
13
            ALTER TABLE `identity_providers`
14
            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';
15
16
            });
17
18
        # Print useful stuff here
19
        # tables
20
        say $out "Extend 'matchpoint' field in 'identity_providers'";
21
22
    },
23
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 3546-3552 CREATE TABLE `identity_providers` ( Link Here
3546
  `protocol` enum('OAuth','OIDC','LDAP','CAS') NOT NULL COMMENT 'Protocol provider speaks',
3546
  `protocol` enum('OAuth','OIDC','LDAP','CAS') NOT NULL COMMENT 'Protocol provider speaks',
3547
  `config` longtext NOT NULL COMMENT 'Configuration of the provider in JSON format',
3547
  `config` longtext NOT NULL COMMENT 'Configuration of the provider in JSON format',
3548
  `mapping` longtext NOT NULL COMMENT 'Configuration to map provider data to Koha user',
3548
  `mapping` longtext NOT NULL COMMENT 'Configuration to map provider data to Koha user',
3549
  `matchpoint` enum('email','userid','cardnumber') NOT NULL COMMENT 'The patron attribute to be used as matchpoint',
3549
  `matchpoint` enum('email','phone','userid','cardnumber') NOT NULL COMMENT 'The patron attribute to be used as matchpoint',
3550
  `icon_url` varchar(255) DEFAULT NULL COMMENT 'Provider icon URL',
3550
  `icon_url` varchar(255) DEFAULT NULL COMMENT 'Provider icon URL',
3551
  PRIMARY KEY (`identity_provider_id`),
3551
  PRIMARY KEY (`identity_provider_id`),
3552
  UNIQUE KEY `code` (`code`),
3552
  UNIQUE KEY `code` (`code`),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_providers.tt (-1 / +6 lines)
Lines 149-154 Link Here
149
                        <label for="matchpoint">Matchpoint: </label>
149
                        <label for="matchpoint">Matchpoint: </label>
150
                        <select name="matchpoint" id="matchpoint">
150
                        <select name="matchpoint" id="matchpoint">
151
                            <option value="email">Email</option>
151
                            <option value="email">Email</option>
152
                            <option value="phone">Phone</option>
152
                            <option value="userid">User ID</option>
153
                            <option value="userid">User ID</option>
153
                            <option value="cardnumber">Card number</option>
154
                            <option value="cardnumber">Card number</option>
154
                        </select>
155
                        </select>
Lines 317-322 Link Here
317
                            [%- ELSE -%]
318
                            [%- ELSE -%]
318
                                <option value="email">Email</option>
319
                                <option value="email">Email</option>
319
                            [%- END -%]
320
                            [%- END -%]
321
                            [%- IF identity_provider.matchpoint == 'phone'      -%]
322
                                <option value="phone" selected="selected">Phone</option>
323
                            [%- ELSE -%]
324
                                <option value="phone">Phone</option>
325
                            [%- END -%]
320
                            [%- IF identity_provider.matchpoint == 'userid'     -%]
326
                            [%- IF identity_provider.matchpoint == 'userid'     -%]
321
                                <option value="userid" selected="selected">User id</option>
327
                                <option value="userid" selected="selected">User id</option>
322
                            [%- ELSE -%]
328
                            [%- ELSE -%]
323
- 

Return to bug 35617