clients
clients copied to clipboard
[EC-16 / EC-86] Implement new Groups table
Type of change
- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Updates the Group table in the Org admin console to use the new CL table component with a Collections column. It also adds support for bulk deletion of groups using row selectors and a bulk options menu. Required server changes can be found at https://github.com/bitwarden/server/pull/2280
Code changes
app/organizations/manage/groups.component.html
- Update the appearance of the New Group button and Search control
- Replace native
<table>
with<bit-table>
- Add Collections column and selection column
- Use
<bit-menu>
for option menus
app/organizations/manage/groups.component.ts
- Update list Groups API request to support including associated collections
- Add API request to retrieve/decrypt all collections for the organization on page load
- This is kept as a separate API call to avoid needing to re-request and decrypt the entire list of org collections on every group modification. Instead, whenever the groups are reloaded, the associated collection names are re-married to the group using the list of decrypted collections retrieved on first page load.
- Add support for bulk deletion of selected groups
- To support selecting "all visible" groups using the
All
checkbox, a newvisibleGroups()
getter was added that supplies the correct listing of groups (searched vs paginated) so that when theAll
checkbox is toggled, it only effects all visible groups. This also means thesearchPipe
is now used/triggered in the component instead of the template
- To support selecting "all visible" groups using the
Other Changes
- apps/web/src/app/shared/shared.module.ts: Add the Table and Link CL modules to the shared module for use in Web project
-
libs/common/src/abstractions/api.service.ts: Add support for
deleteManyGroups
and include collection details in read groups response. (This, along with other Group Api methods, will be moved to a newGroupApiService
in a future separate PR) - libs/common/src/models/response/groupResponse.ts: Extract interface for common group properties so that that a separate, redundant, row type does not need to redefine all the group properties.
Screenshots
Before you submit
- Please add unit tests where it makes sense to do so (encouraged but not required)
- If this change requires a documentation update - notify the documentation team
- If this change has particular deployment requirements - notify the DevOps team