From 3f4cca06f196b4fe3a2bf1603170011079a63216 Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Tue, 4 Nov 2025 15:22:11 +0000 Subject: [PATCH] Bug 39224: DBIC - DO NOT PUSH --- Koha/Schema/Result/ShibbolethConfig.pm | 109 ++++++++++++++++++ Koha/Schema/Result/ShibbolethFieldMapping.pm | 113 +++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 Koha/Schema/Result/ShibbolethConfig.pm create mode 100644 Koha/Schema/Result/ShibbolethFieldMapping.pm diff --git a/Koha/Schema/Result/ShibbolethConfig.pm b/Koha/Schema/Result/ShibbolethConfig.pm new file mode 100644 index 00000000000..c7456989f27 --- /dev/null +++ b/Koha/Schema/Result/ShibbolethConfig.pm @@ -0,0 +1,109 @@ +use utf8; +package Koha::Schema::Result::ShibbolethConfig; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::ShibbolethConfig + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("shibboleth_config"); + +=head1 ACCESSORS + +=head2 shibboleth_config_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +primary key + +=head2 force_opac_sso + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Force Shibboleth SSO for OPAC + +=head2 force_staff_sso + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Force Shibboleth SSO for staff interface + +=head2 autocreate + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Automatically create new patrons + +=head2 sync + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Sync patron attributes on login + +=head2 welcome + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +Send welcome email to new patrons + +=cut + +__PACKAGE__->add_columns( + "shibboleth_config_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "force_opac_sso", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "force_staff_sso", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "autocreate", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "sync", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "welcome", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("shibboleth_config_id"); + + +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-31 15:43:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AIDq10SUxo8NgJsBj8oldg + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/ShibbolethFieldMapping.pm b/Koha/Schema/Result/ShibbolethFieldMapping.pm new file mode 100644 index 00000000000..0735f02a870 --- /dev/null +++ b/Koha/Schema/Result/ShibbolethFieldMapping.pm @@ -0,0 +1,113 @@ +use utf8; +package Koha::Schema::Result::ShibbolethFieldMapping; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::ShibbolethFieldMapping + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("shibboleth_field_mappings"); + +=head1 ACCESSORS + +=head2 mapping_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +primary key + +=head2 idp_field + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +Field name from the identity provider + +=head2 koha_field + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +Corresponding field in Koha borrowers table + +=head2 is_matchpoint + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +If this field is used to match existing users + +=head2 default_content + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +Default content for this field if not provided by the IdP + +=cut + +__PACKAGE__->add_columns( + "mapping_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "idp_field", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "koha_field", + { data_type => "varchar", is_nullable => 0, size => 255 }, + "is_matchpoint", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "default_content", + { data_type => "varchar", is_nullable => 1, size => 255 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("mapping_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("koha_field_idx", ["koha_field"]); + + +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-31 15:43:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jMBj5Kjjkh1fX74py69SXQ + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.39.5