Bug 36276: Fix editing of identity provider and domains

This patch fixes identity_providers.pl to remove the "cud-" prefix for
two operations which are not POSTed: editing identity providers and
editing domains.

To test, apply the patch and restart services.

- Go to Administration -> Identity providers.
- If necessary, create an identity provider and then click "Manage
  domains" -> New identity provider domain to create a new domain.
- From the list of domains, click "Edit"
- The edit form should appear with all the correct details prefilled.
  - Check that the page title, breadcrumbs, and page header all show the
    correct domain.
  - Make a change to the domain and confirm that the changes are saved.

- From the list of identity providers, click "Edit"
- This form should also load correctly.
- Submitted changes should be saved correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2024-07-09 18:40:33 +00:00 committed by Katrin Fischer
parent 8c43845a58
commit 32578e4f72
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -155,7 +155,7 @@ elsif ( $domain_ops && $op eq 'cud-add' ) {
# list servers after adding # list servers after adding
$op = 'list'; $op = 'list';
} }
elsif ( !$domain_ops && $op eq 'cud-edit_form' ) { elsif ( !$domain_ops && $op eq 'edit_form' ) {
if ( $identity_provider ) { if ( $identity_provider ) {
$template->param( $template->param(
@ -171,7 +171,7 @@ elsif ( !$domain_ops && $op eq 'cud-edit_form' ) {
}; };
} }
} }
elsif ( $domain_ops && $op eq 'cud-edit_form' ) { elsif ( $domain_ops && $op eq 'edit_form' ) {
my $identity_provider_domain_id = $input->param('identity_provider_domain_id'); my $identity_provider_domain_id = $input->param('identity_provider_domain_id');
my $identity_provider_domain; my $identity_provider_domain;