From 0ccbe11762ae3f30e49135d71c5ca73f302673e4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 22 Aug 2024 15:26:13 -0300 Subject: [PATCH] Bug 37711: API changes This patch makes the API representation of the identity providers domains match the new metadata. --- .../definitions/identity_provider_domain.yaml | 10 +++++++--- t/db_dependent/api/v1/idp.t | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/api/v1/swagger/definitions/identity_provider_domain.yaml b/api/v1/swagger/definitions/identity_provider_domain.yaml index a912e735d07..b18b1a6f6d6 100644 --- a/api/v1/swagger/definitions/identity_provider_domain.yaml +++ b/api/v1/swagger/definitions/identity_provider_domain.yaml @@ -13,8 +13,11 @@ properties: type: - string - "null" - auto_register: - description: If patrons will be generated on login if required + auto_register_opac: + description: If patrons will be generated on login if required (OPAC) + type: boolean + auto_register_staff: + description: If patrons will be generated on login if required (Staff interface) type: boolean update_on_auth: description: If patron data is updated on login @@ -39,7 +42,8 @@ additionalProperties: false required: - identity_provider_domain_id - domain - - auto_register + - auto_register_opac + - auto_register_staff - update_on_auth - default_library_id - default_category_id diff --git a/t/db_dependent/api/v1/idp.t b/t/db_dependent/api/v1/idp.t index c67b5124e00..7250233071f 100755 --- a/t/db_dependent/api/v1/idp.t +++ b/t/db_dependent/api/v1/idp.t @@ -106,7 +106,8 @@ my $oidc_without_email_provider_data = { my $domain_not_matching = { domain => 'gmail.com', - auto_register => 0, + auto_register_opac => 0, + auto_register_staff => 0, update_on_auth => 0, default_library_id => undef, default_category_id => undef, @@ -116,7 +117,8 @@ my $domain_not_matching = { my $domain_no_register = { domain => 'some.library.com', - auto_register => 0, + auto_register_opac => 0, + auto_register_staff => 0, update_on_auth => 0, default_library_id => undef, default_category_id => undef, @@ -129,7 +131,8 @@ my $category = $builder->build_object( { class => 'Koha::Patron::Categories' } ) my $domain_register = { domain => 'some.library.com', - auto_register => 1, + auto_register_opac => 1, + auto_register_staff => 0, update_on_auth => 0, default_library_id => $library->branchcode, default_category_id => $category->categorycode, @@ -139,7 +142,8 @@ my $domain_register = { my $domain_register_update = { domain => 'some.library.com', - auto_register => 1, + auto_register_opac => 1, + auto_register_staff => 0, update_on_auth => 1, default_library_id => $library->branchcode, default_category_id => $category->categorycode, -- 2.46.0