[PR #5075] [MERGED] [PM-18092] Update cipher delete restore permissions #5457

Closed
opened 2025-11-27 00:00:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5075
Author: @andrebispo5
Created: 4/18/2025
Status: Merged
Merged: 5/5/2025
Merged by: @andrebispo5

Base: mainHead: pm-18092/cipher-delete-restore-permissions


📝 Commits (10+)

  • 30bf954 [PM-18092] Update app with SDK changes for permissions fields
  • c14681a [PM-18092] Add restrict cipher item deletion feature flag
  • 4ef3d99 [PM-18092] Add delete and restore logic to UI and viewmodels
  • b49ba06 [PM-18092] Fix tests
  • 1f2d6cc [PM-18092] Add minimum necessary updates to update to latests SDK version
  • 70a8325 [PM-18092] Fix sync test.
  • 49dc57c Merge branch 'main' into pm-18092/cipher-delete-restore-permissions
  • 1030eef [PM-18092] Fix test
  • 0c47425 [PM-18092] Add tests
  • 77d1c33 [PM-18092] Fix bug with restore button

📊 Changes

30 files changed (+655 additions, -14 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt (+10 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/Fido2CredentialStoreImpl.kt (+11 -2)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/repository/VaultRepository.kt (+9 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt (+37 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/repository/util/VaultSdkCipherExtensions.kt (+38 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt (+2 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt (+21 -4)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreen.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt (+35 -2)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/model/VaultItemStateData.kt (+1 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt (+2 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/util/VaultAddItemStateExtensions.kt (+1 -0)
📝 app/src/main/res/values/strings_non_localized.xml (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/FlagKeyTest.kt (+6 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/disk/VaultDiskSourceTest.kt (+4 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/VaultSdkCipherUtil.kt (+14 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModelTest.kt (+2 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+159 -4)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensionsTest.kt (+2 -0)

...and 10 more files

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-18092
SDK update: https://bitwarden.atlassian.net/browse/PM-20459

📔 Objective

Use new cipher permissions properties to show or hide the delete and restore buttons on the UI.

Note:
SDK version bump needed some codebase updates, all changes not related to this feature were made in this commit: 30bf954414
🌱 Only bare minimum changes were included for Fido2CredentialStoreImpl.allCredentials method to work and project to compile. No tests were added for the none related changes. Further work with CipherListView SDK update will take part in the development of the android version of https://bitwarden.atlassian.net/issues/PM-18283

📸 Screenshots

https://github.com/user-attachments/assets/efe03a6a-d42c-449e-bbf1-cdbe54bed92a

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/5075 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 4/18/2025 **Status:** ✅ Merged **Merged:** 5/5/2025 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `main` ← **Head:** `pm-18092/cipher-delete-restore-permissions` --- ### 📝 Commits (10+) - [`30bf954`](https://github.com/bitwarden/android/commit/30bf95441466c7f06c21897ec7585b4c82cecaa8) [PM-18092] Update app with SDK changes for permissions fields - [`c14681a`](https://github.com/bitwarden/android/commit/c14681a41b50176d96a2175b90125bf023fb2914) [PM-18092] Add restrict cipher item deletion feature flag - [`4ef3d99`](https://github.com/bitwarden/android/commit/4ef3d9903018a06975d099d4d3c6c64205d0b9c0) [PM-18092] Add delete and restore logic to UI and viewmodels - [`b49ba06`](https://github.com/bitwarden/android/commit/b49ba0668303549b5847455d689f93b2ff563704) [PM-18092] Fix tests - [`1f2d6cc`](https://github.com/bitwarden/android/commit/1f2d6cc3c34b55c03909c98a6b4a55547d63ffa2) [PM-18092] Add minimum necessary updates to update to latests SDK version - [`70a8325`](https://github.com/bitwarden/android/commit/70a8325cf736e5ab583fc4c141beecf666a37b65) [PM-18092] Fix sync test. - [`49dc57c`](https://github.com/bitwarden/android/commit/49dc57cc724bbc3ecdf627e8358758a8c10780a0) Merge branch 'main' into pm-18092/cipher-delete-restore-permissions - [`1030eef`](https://github.com/bitwarden/android/commit/1030eef5aa7bb3fd1ad8aacdd0f2f6b4356a2cd9) [PM-18092] Fix test - [`0c47425`](https://github.com/bitwarden/android/commit/0c474255720a4b9dac2dd0a50f6d002f33d1e3f9) [PM-18092] Add tests - [`77d1c33`](https://github.com/bitwarden/android/commit/77d1c33738affc91c743979d522d1e04a2985dd1) [PM-18092] Fix bug with restore button ### 📊 Changes **30 files changed** (+655 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt` (+10 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/Fido2CredentialStoreImpl.kt` (+11 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/repository/VaultRepository.kt` (+9 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryImpl.kt` (+37 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/repository/util/VaultSdkCipherExtensions.kt` (+38 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt` (+2 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt` (+21 -4) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemScreen.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt` (+35 -2) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/model/VaultItemStateData.kt` (+1 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/util/CipherViewExtensions.kt` (+2 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/vault/util/VaultAddItemStateExtensions.kt` (+1 -0) 📝 `app/src/main/res/values/strings_non_localized.xml` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/FlagKeyTest.kt` (+6 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/disk/VaultDiskSourceTest.kt` (+4 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/vault/datasource/sdk/model/VaultSdkCipherUtil.kt` (+14 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModelTest.kt` (+2 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+159 -4) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensionsTest.kt` (+2 -0) _...and 10 more files_ </details> ### 📄 Description ## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/PM-18092 SDK update: https://bitwarden.atlassian.net/browse/PM-20459 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> Use new cipher permissions properties to show or hide the delete and restore buttons on the UI. **Note:** SDK version bump needed some codebase updates, all changes not related to this feature were made in this commit: https://github.com/bitwarden/android/pull/5075/commits/30bf95441466c7f06c21897ec7585b4c82cecaa8 :seedling: Only bare minimum changes were included for `Fido2CredentialStoreImpl.allCredentials` method to work and project to compile. No tests were added for the none related changes. Further work with `CipherListView` SDK update will take part in the development of the android version of https://bitwarden.atlassian.net/issues/PM-18283 ## 📸 Screenshots <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> https://github.com/user-attachments/assets/efe03a6a-d42c-449e-bbf1-cdbe54bed92a ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-27 00:00:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#5457