Skip to content

[PM-37782] User with view permission cannot favorite or add an item to a folder#20764

Draft
jengstrom-bw wants to merge 3 commits into
mainfrom
vault/pm-37782/user-with-view-permission-cannot-favorite-or-add-an-item-to-a-folder
Draft

[PM-37782] User with view permission cannot favorite or add an item to a folder#20764
jengstrom-bw wants to merge 3 commits into
mainfrom
vault/pm-37782/user-with-view-permission-cannot-favorite-or-add-an-item-to-a-folder

Conversation

@jengstrom-bw
Copy link
Copy Markdown
Contributor

🎟️ Tracking

Jira

📔 Objective

Fix the SDK code path to allow for partial cipher updates (folder id, favorite).

@jengstrom-bw jengstrom-bw added the ai-review-vnext Request a Claude code review using the vNext workflow label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR adds an SDK partial-update code path so users with view-only permission can still update folder/favorite on a cipher, mirroring updateWithServerLegacy in cipher.service.ts. The mapping in CipherView.toSdkPartialUpdateCipherRequest() (id, folderId, favorite) matches the legacy CipherPartialRequest, and the branching logic in DefaultCipherSdkService.updateWithServer (orgAdmincipher.editedit_partial fallback) correctly reflects the legacy semantics. The latest commit addresses the previously raised concern: mockCiphersSdk.edit_partial is now mocked, existing tests set cipher.edit = true to keep exercising the edit branch, and new tests cover the edit_partial success path, the default-edit-false path, and the edit_partial error path with exclusivity assertions for edit and admin.

Code Review Details

No findings.

Comment thread libs/common/src/vault/services/cipher-sdk.service.ts
@sonarqubecloud
Copy link
Copy Markdown

@jengstrom-bw
Copy link
Copy Markdown
Contributor Author

Needs bitwarden/sdk-internal#1114 for SDK bindings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant