Skip to content

Conversation

@julien-nc
Copy link
Member

@julien-nc julien-nc commented Jun 26, 2025

closes #1142

Display a dialog when clicking on the delete button of a provider.

image

Also fix the prop passed to the edition NcModal to avoid displaying the close button in it.

{{ t('user_oidc', 'Cancel') }}
</NcButton>
<NcButton
variant="warning"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the warning variant rather than error? The red color makes more sense to me, personally, even if it's not technically an "error".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with error.

@julien-nc julien-nc force-pushed the enh/1142/confirm-deletion branch from 1e8bb4a to e9d602f Compare June 30, 2025 15:02
@julien-nc julien-nc requested a review from edward-ly June 30, 2025 15:03
Comment on lines +222 to +225
if (this.providerToDelete) {
return t('user_oidc', 'Are you sure you want to delete the provider "{providerName}"?', { providerName: this.providerToDelete.identifier })
}
return ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this.providerToDelete) {
return t('user_oidc', 'Are you sure you want to delete the provider "{providerName}"?', { providerName: this.providerToDelete.identifier })
}
return ''
if (!this.providerToDelete) {
return ''
}
return t('user_oidc', 'Are you sure you want to delete the provider "{providerName}"?', { providerName: this.providerToDelete.identifier })

a small refactor to reduce the line length, but it's up to you, LGTM otherwise

@julien-nc julien-nc merged commit ccbe96d into main Jun 30, 2025
39 checks passed
@julien-nc julien-nc deleted the enh/1142/confirm-deletion branch June 30, 2025 17:03
@julien-nc julien-nc mentioned this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no confirmation when deleting an identity provider

3 participants