Skip to content

Conversation

@ThomasKientz
Copy link

Summary

Fixed the issue where users could create standing orders with new beneficiaries even when canInitiatePaymentsToNewBeneficiaries was set to false.

The Problem

  • TransferRecurringWizard always allowed entering new beneficiaries without checking permissions.
  • canCreateStandingOrder didn't check canInitiatePaymentsToNewBeneficiaries.

The Solution

Updated TransferRecurringWizard to match TransferRegularWizard:

  1. Added a BeneficiaryStep component that checks canInitiateCreditTransferToNewBeneficiary (which includes canInitiatePaymentsToNewBeneficiaries).
  2. Shows tabs for "New" and "Saved" beneficiaries.
  3. Only shows the "New" tab if the user has permission to initiate payments to new beneficiaries.
  4. Uses SavedBeneficiariesForm for selecting existing beneficiaries.

Now, when canInitiatePaymentsToNewBeneficiaries is false, users can only create standing orders with existing saved beneficiaries, not new ones.

The fix is complete and follows the same pattern used for regular credit transfers.

## Summary

Fixed the issue where users could create standing orders with new beneficiaries even when `canInitiatePaymentsToNewBeneficiaries` was set to `false`.

### The Problem
- `TransferRecurringWizard` always allowed entering new beneficiaries without checking permissions.
- `canCreateStandingOrder` didn't check `canInitiatePaymentsToNewBeneficiaries`.

### The Solution
Updated `TransferRecurringWizard` to match `TransferRegularWizard`:

1. Added a `BeneficiaryStep` component that checks `canInitiateCreditTransferToNewBeneficiary` (which includes `canInitiatePaymentsToNewBeneficiaries`).
2. Shows tabs for "New" and "Saved" beneficiaries.
3. Only shows the "New" tab if the user has permission to initiate payments to new beneficiaries.
4. Uses `SavedBeneficiariesForm` for selecting existing beneficiaries.

Now, when `canInitiatePaymentsToNewBeneficiaries` is `false`, users can only create standing orders with existing saved beneficiaries, not new ones.

The fix is complete and follows the same pattern used for regular credit transfers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant