Skip to content
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

[AC-2447] Allow the UI to save and close dialog when user removes final Can Manage Collection of an item #9136

Merged
merged 8 commits into from
May 21, 2024

Conversation

Jingo88
Copy link
Contributor

@Jingo88 Jingo88 commented May 10, 2024

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

Objective

Previously when a user removed the final Can Manage collection of an item, the dialog would stay open and there was no indication that update was processed.

Now the collections dialog will close on save and the Cipher they no longer have access to will be removed from their list

Screen Recording

AC-2447-Last-Can-Manage-Removed.mov

… longer manage cipher after requested update
@Jingo88 Jingo88 requested a review from a team as a code owner May 10, 2024 18:22
@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

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

Project coverage is 28.13%. Comparing base (56c4be4) to head (bd7e5f1).
Report is 1 commits behind head on main.

Files Patch % Lines
.../vault/models/response/optional-cipher.response.ts 0.00% 6 Missing ⚠️
libs/common/src/vault/services/cipher.service.ts 0.00% 4 Missing ⚠️
libs/common/src/services/api.service.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9136      +/-   ##
==========================================
- Coverage   28.14%   28.13%   -0.02%     
==========================================
  Files        2361     2362       +1     
  Lines       69846    69858      +12     
  Branches    13133    13134       +1     
==========================================
- Hits        19660    19655       -5     
- Misses      48629    48646      +17     
  Partials     1557     1557              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented May 10, 2024

Logo
Checkmarx One – Scan Summary & Details6cbad633-a08e-4e58-9773-5350bb2b4253

No New Or Fixed Issues Found

LRNcardozoWDF
LRNcardozoWDF previously approved these changes May 13, 2024
Copy link
Member

@LRNcardozoWDF LRNcardozoWDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@shane-melton shane-melton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my review on bitwarden/server#4074 (review)

shane-melton
shane-melton previously approved these changes May 20, 2024
@@ -778,11 +778,11 @@ export class CipherService implements CipherServiceAbstraction {
const response = await this.apiService.putCipherCollections(cipher.id, request);
// The response will be null when a Owner/Admin makes a request removing the last Can Manage Access
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We can update this comment since we're returning the new optional response model now and not null.

@shane-melton shane-melton self-requested a review May 21, 2024 14:16
@Jingo88 Jingo88 removed the needs-qa Marks a PR as requiring QA approval label May 21, 2024
@Jingo88 Jingo88 merged commit 5075d08 into main May 21, 2024
62 of 63 checks passed
@Jingo88 Jingo88 deleted the AC-2447-last-can-manage-remove branch May 21, 2024 16:32
quexten pushed a commit that referenced this pull request May 22, 2024
…al Can Manage Collection of an item (#9136)

* update saveCollectionsWithServer to accept a new value if user can no longer manage cipher after requested update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants