-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Is a member of][User groups] 'Delete' button functionality #274
Conversation
The `User` data type needs the following parameters that will be managed in the 'Is a member of' section: - `memberof_group` - `memberof_netgroup` - `memberof_role` - `memberof_hbacrule` - `memberof_sudorule` - `memberof_subid` Signed-off-by: Carla Martinez <[email protected]>
As other components are using the `MemberOfTable` and `MemberOfToolbar` components, there are many dependencies to correct and adapt. The new `MemberOfTableNew` and `MemberOfToolbarNew` have been defined to be used when adapting the 'User groups' data only. The same has been done in the data types by creating a new `UserGroupNew` type that will be used later. The `normalizeString` utility function is meant to normalize LDAP values from `string[]` to `string`. Signed-off-by: Carla Martinez <[email protected]>
The dummy data must be replaced by the data from the API for the 'User groups' only. Signed-off-by: Carla Martinez <[email protected]>
The 'Add' button functionality allows to associate any user group's member to a given user. Signed-off-by: Carla Martinez <[email protected]>
The 'Delete' button should delete a list of members from the User groups list for a given user. The `MemberOfDeleteModalNew` and `MemberOfDeletedGroupsTableNew` have been adapted from the original ones (without the `new` suffix) to adapt the new data and keep the functionality in other pages (that is not adapted to the C.L. yet). These new components will eventually replace the older ones. Signed-off-by: Carla Martinez <[email protected]>
form="modal-form" | ||
onClick={onClickAddGroupHandler} | ||
> | ||
Add |
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.
Could you add the spinning props here and disable the Add button at the same time?
onClick={deleteGroups} | ||
form="active-users-remove-groups-modal" | ||
> | ||
Delete |
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.
Spin/disable the button here as well
@carma12 - I think you need to rebase this PR as it does not apply to main branch |
Closing this PR in favor of this one: #301 |
The 'Delete' button should delete a list of members from the User groups list for a given user.
The
MemberOfDeleteModalNew
andMemberOfDeletedGroupsTableNew
have been adapted from the original ones (without thenew
suffix) to adapt the new data and keep the functionality in other pages (that is not adapted to the C.L. yet). These new components will eventually replace the older ones.This PR depends on this one to be merged: #272