This repository was archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 403
Improve SSO Config validation #1332
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hinton
reviewed
Feb 22, 2022
Hinton
reviewed
Mar 1, 2022
bitwarden_license/src/app/organizations/components/input-text.component.ts
Show resolved
Hide resolved
9 tasks
|
Some tidy up work in bitwarden/jslib#701 that should be included in this PR. Once that's merged & updated here, we should be good to go. |
|
Ready to go @Hinton, thank you for your help with this |
Hinton
approved these changes
Mar 3, 2022
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.
Looks good from a pure code perspective. We'll want QA to do some regression testing on this.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
Code changes
Form components:
ControlValueAccessor(CVA) implementation, commonInputs and helper methods. Used by the custom controls below.type="text"control with label, inline error messages and helper textThese components use aria labels etc. to increase accessibility.
SSO configuration page (
sso.component)Class:
FormControlsFormGroup. This prevents validators from running.postDatamethod back intosubmit. ThepostDatamethod was only to hook into theappApiActiondirective to show an error toast if the Key Connector URL was invalid. We now use an inline error messages for all this, so it's not required.getErrorCount- a live display of the error count to the user. Note thaterrorson aFormGrouponly showFormGrouplevel errors, it does not show the errors of the child controls. So we have to get this count ourselves.validateForm- manually triggers validation for all fields even if they haven't been blurred by the user. This is required on submit in case the user has not interacted with a field that requires validation.readOutErrors- because the error count may already be present when the user clicks submit, a screenreader user will not receive a readout. There does not appear to be any way to programatically trigger a readout, other than appending ansr-onlydiv with the contents. Not great, but not sure how else to achieve this.Template:
template: use the above components where possible. I haven't moved controls into components if they're only used once (e.g. the
textareaused for the X509 cert)move dropdown options out of the templates and into the component classes. Use enums properly instead of hard-coding their literal values into the template.
move the OpenId Optional Customizations into its own collapsible section. Use
aria-expandedto indicate its statemessages.jsonDepends on:
Screenshots
Testing requirements
Before you submit
npm run lint) (required)