fix(console): disallow smtp double create #8964 (#11868)

<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved

When creating a new smtp providers it was possible to click the create
button multiple times and create duplicate smtp providers.

# How the Problems Are Solved

Disable the create button when the smtp provider creation is pending.

# Additional Context
- Closes: #8964
This commit is contained in:
Ramon
2026-04-03 10:12:25 +00:00
committed by GitHub
parent 0945195f68
commit 6877f09c84
@@ -243,7 +243,10 @@
color="primary"
data-e2e="create-button"
[disabled]="
state.mainForm.invalid || state.senderForm.invalid || (['iam.policy.write'] | hasRole | async) === false
updateDataMutation.isPending() ||
state.mainForm.invalid ||
state.senderForm.invalid ||
(['iam.policy.write'] | hasRole | async) === false
"
>
{{ 'config' in state ? ('ACTIONS.SAVE' | translate) : ('ACTIONS.CREATE' | translate) }}