-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: PKI config refactor #18639
UI: PKI config refactor #18639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job refactoring to accommodate a single config model! I like this way of handling the form - it feels easier to follow! Some minor questions/suggestions, nothing blocking 😎
import { setupTest } from 'vault/tests/helpers'; | ||
import { setupMirage } from 'ember-cli-mirage/test-support'; | ||
|
||
module('Unit | Adapter | pki/config', function (hooks) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏
050bb41
to
65fd0ef
Compare
@lazyCapabilities(apiPath`${'backend'}/issuers/import/bundle`, 'backend') importBundlePath; | ||
@lazyCapabilities(apiPath`${'backend'}/issuers/generate/root/${'type'}`, 'backend', 'type') | ||
generateIssuerRootPath; | ||
@lazyCapabilities(apiPath`${'backend'}/issuers/generate/intermediate/${'type'}`, 'backend', 'type') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note for later - I think both of these generate capability paths will have to be without type
since that's selected by the user in the form and so it will always be undefined since type
won't exist on the model until it's selected?
shouldUseIssuerEndpoint() { | ||
const { config } = this.args; | ||
// To determine which endpoint the config adapter should use, | ||
// we want to check highest-privileged capabilities and use the | ||
// fallback (issuer path) if user does not have permissions. | ||
// we want to check capabilities on the newer endpoints (those |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this comment!
Updates the PKI Configure flow so that all the options share one model. Follow-on work will involve creating form components for each of the other options.