-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add onChange function for checkboxes #116
Closed
Closed
Conversation
This file contains 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
This PR depends on these ones to be merged: #115 |
89698a9
to
58e0505
Compare
The audit-ci tool detected a vulnerability[1] of a WebUI dependency. The semver library is a direct dependency of the babel-loader library. Due to this error, the gating tests are not passing. This has been fixed by adding the babel-loader library to the audit-ci whitelist (allowlisting[2]). [1]- GHSA-c2qf-rxjj-qqgw [2]- https://github.com/IBM/audit-ci#allowlisting Related: babel/babel-loader#992 Signed-off-by: Carla Martinez <carlmart@redhat.com>
Some data coming from the IPA server will refer to datetime formats, but the data retrieved as a response from the API calls is received as a string type. Considering that the new WebUI is still dealing with dummy data (hence, some data can be only initialized as string) and the `globalDataTypes.ts` file is managing those data as `Date | string`, it is still needed a way to parse the datetime format from string to Date[1] to manage the dates in a proper way and show them in the fields (e.g: `krbpasswordexpiration`). [1]- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date Signed-off-by: Carla Martinez <carlmart@redhat.com>
The fields of the 'Active users' > 'Settings' section need to show the IPA server data values. The following calls are made when the user 'Settings' page is loaded: - Batch - `user_show` (with `{all: true, rights: true}` params) retrieves the full user data. - `pwpolicy_show` retrieves the password policy data. - `krbtpolicy_show` retrieves the kerberos ticket policy data. - `cert_find` retrieves the list of certificates. - `radiusproxy_find` retrieves the list of RADIUS servers. - `idp_find` retrieves the list of IdP servers. - `user_find` retrieves the list of user IDs. In order to manage the data coming from the certificates and RADIUS servers, a new data types have been defined in the `globalDataTypes.ts` file: `Certificate` and `RadiusServer`. Some components have been adapted to take those types (e.g: `CertificateMappingDataModal`) The data from the IPA server has been retrieved from the `UserSettings` component and has been propagated to the following subsection components via props: - `UsersIdentity`: Identity settings - `UsersAccountSettings`: Account settings - `UsersPasswordPolicy`: Password policy - `UsersKerberosTicket`: Kerberos ticket policy - `UsersContactSettings`: Contact settings - `UsersMailingAddress`: Mailing address - `UsersEmployeeInfo`: Employee information - `UsersAttributesSMB`: User attributes for SMB services The interaction between the API call response status and the UI has been managed using a Spinner[1] component. [1]- https://www.patternfly.org/v4/components/spinner/react Signed-off-by: Carla Martinez <carlmart@redhat.com>
As the permission for the different UI elements will be soon managed, the `CalendarLayout` component needs to have the `isDisabled` prop to disable the date-time textbox if the user does not have writing permissions. Signed-off-by: Carla Martinez <carlmart@redhat.com>
In order to manage the field permissions for a specific user, it would be interesting using a wrapper to manage the read and write permissions instead of inserting it manually in all fields. The `FieldWrapper` component is meant to be wrapped around any `FormGroup` component that contains a simple field layout structure. It overrides the props of the parent and child components and sets the visibility of a field (if this should be readable/unreadable) and the writability (provided by the `isDisabled` prop in child component). Signed-off-by: Carla Martinez <carlmart@redhat.com>
The `attributelevelrights` variable taken from the `user_show` API call determines the permissions of a specific field. This variable should be interpreted from a utility function to check if it has read and write permissions. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Identity settings' section should be applied using the `FieldWrapper` components, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Account settings' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Password policy' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Kerberos ticket' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Contact settings' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Mailing address' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'Employee information' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The permissions for the fields available in the 'User attributes for SMB services' section should be applied using the `FieldWrapper` component, whenever is possible. Signed-off-by: Carla Martinez <carlmart@redhat.com>
The 'Refresh' button functionality needs to be implemented to retrieve the data again from the API and update it to the WebUI. Signed-off-by: Carla Martinez <carlmart@redhat.com>
When clicking any checkbox that was checked already there was no effect on the element (the checkbox remained checked without any changes). This has been fixed by adding a 'onChange' handler to manage any change for the 'User authentication types' checkboxes. Signed-off-by: Carla Martinez <carlmart@redhat.com>
58e0505
to
52a1dc0
Compare
Closing this PR because this will be covered as part of another solution: #135 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When clicking any checkbox that was checked already there was no effect on the element (the checkbox remained checked without any changes).
This has been fixed by adding an 'onChange' handler to manage any change for the 'User authentication types' checkboxes.
Signed-off-by: Carla Martinez carlmart@redhat.com