clients icon indicating copy to clipboard operation
clients copied to clipboard

AC-2161 update cipher collections org vault modal

Open Jingo88 opened this issue 1 year ago • 2 comments
trafficstars

- [ ] Bug fix
- [ X ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

When Org has Owners and Admins can manage all collections and items turned on

  • Owner can open the Edit Collections modal and add/remove collections associated with the cipher

When Org has Owners and Admins can manage all collections and items turned off

  • Owner can open the Edit Collections modal
  • Collections they have readOnly access to will be on the bottom
  • If the cipher does not have any Can Edit collections associated with it, the Owner will be blocked from updating that ciphers collections. When trying to save in this instance they will get an error toast

Code changes

  • vault.component - Added a sort for collections before opening the Modal. Update to show all collections instead of only editableCollections$. Pass in flexible collections flag to modal
  • collections.component.ts (individual)- Do not allow check to complete on readOnly cipher row
  • collections.component.ts (org) - use the canEditAllCiphers boolean to assess what endpoint to hit
  • collections.component.ts (admin-console) - access if org canEditAnyCollection is turned on/off
  • collections.component.html - Added disable to the checkbox of the readOnly cipher

Recording

https://github.com/bitwarden/clients/assets/8302660/4ae47547-08da-4054-bc41-0ec43748047b

Jingo88 avatar Feb 21 '24 15:02 Jingo88

Codecov Report

Attention: Patch coverage is 8.16327% with 45 lines in your changes are missing coverage. Please review.

Project coverage is 26.22%. Comparing base (cd5dc09) to head (36f5c43).

:exclamation: Current head 36f5c43 differs from pull request most recent head a744ade. Consider uploading reports for the commit a744ade to get more accurate results

Files Patch % Lines
...pps/web/src/app/vault/org-vault/vault.component.ts 0.00% 14 Missing :warning:
...bs/common/src/vault/models/view/collection.view.ts 20.00% 8 Missing :warning:
.../admin-console/components/collections.component.ts 0.00% 7 Missing :warning:
...b/src/app/vault/org-vault/collections.component.ts 14.28% 5 Missing and 1 partial :warning:
...pp/vault/individual-vault/collections.component.ts 20.00% 3 Missing and 1 partial :warning:
...lt/popup/components/vault/collections.component.ts 0.00% 3 Missing :warning:
...sktop/src/vault/app/vault/collections.component.ts 0.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8027      +/-   ##
==========================================
- Coverage   26.34%   26.22%   -0.12%     
==========================================
  Files        2286     2278       -8     
  Lines       66938    66817     -121     
  Branches    12577    12571       -6     
==========================================
- Hits        17635    17524     -111     
+ Misses      47930    47925       -5     
+ Partials     1373     1368       -5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 21 '24 15:02 codecov[bot]

Logo Checkmarx One – Scan Summary & Details56d484e0-54d3-4317-baed-29a8115e71b3

No New Or Fixed Issues Found

bitwarden-bot avatar Feb 21 '24 17:02 bitwarden-bot