Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: fixes validation bug in pki role sign certificate form #19280

Merged
merged 7 commits into from
Feb 22, 2023

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented Feb 22, 2023

When validations were added to the generate certificate from a role form (#19035) we missed that two different models are passed to the same PkiRoleGenerate.ts component (pki/certificate/sign and pki/certificate/generate) and only one of them had the validations decorator.

Initially, I moved validations to the base certificate model, but then opted to remove validations all together because requiring a common name depends on the role. The default is to require it, but this param can be changed (docs) and applies to both signing and generating a certificate. The error message returned by the API feels sufficient to guide the user:

Screenshot 2023-02-21 at 6 45 31 PM

@hellobontempo hellobontempo changed the title UI: fixes validation bug in sign certificate form UI: fixes validation bug in pki role sign certificate form Feb 22, 2023
name: string;
backend: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of these existed in the base model so seemed reasonable to remove these duplicates?

Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants