8000 [BITAU-174] [BITAU-151] Remove shared items and key when a user disables sync by brant-livefront · Pull Request #1004 · bitwarden/ios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BITAU-174] [BITAU-151] Remove shared items and key when a user disables sync #1004

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

Conversation

brant-livefront
Copy link
Collaborator

🎟️ Tracking

  • BITAU-151 Delete the shared Authenticator key when sync is turned off for all accounts.
  • BITAU-174 Delete all shared items when sync is turned off for an account.

📔 Objective

This PR cleans up the DataStore and keys when a user disables sync. When a user disables sync (after turning it on) for an account, we delete all of that account's items from the shared store. We then check to see if this was the last account to have sync turned on. If there are no other accounts with sync turned on, we then delete the main shared Authenticator key from the App Group keychain. If there are more accounts still with sync turned on, we leave the key in place.

This allows a user to turn off sync for one or all of their accounts and we clear everything up so that there's no left over data from having turned sync on.

Note: This PR is based off of the branch for this open PR. The other PR would need to be approved/merged first, or this will merge into that PR and wait for it to be approved/merge.

⏰ 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

…ges out of DataStore to prepare for refactor in the brant/create-coredata-store branch
…M app CoreData semantics. Refactor conveience methods to new service class
Copy link
codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.07%. Comparing base (043c1c7) to head (1615d2e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1004   +/-   ##
=======================================
  Coverage   89.07%   89.07%           
=======================================
  Files         660      660           
  Lines       41292    41304   +12     
=======================================
+ Hits        36781    36793   +12     
  Misses       4511     4511           

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

Copy link
Contributor
github-actions bot commented Oct 3, 2024

Logo
Checkmarx One – Scan Summary & Detailsdcc50d9f-b764-442e-b7d5-7bbf260dd132

No New Or Fixed Issues Found

fedemkr
fedemkr previously approved these changes Oct 7, 2024
Base automatically changed from brant/BITAU-152-handle-vault-lock-unlock to main October 7, 2024 16:56
@brant-livefront brant-livefront dismissed fedemkr’s stale review October 7, 2024 16:56

The base branch was changed.

@brant-livefront
Copy link
Collaborator Author

@fedemkr This dismissed your approval because this was re-targeted to main once I merged the other PR in and I needed to fix some conflicts when this merged in.

@brant-livefront brant-livefront merged commit 67c1083 into main Oct 7, 2024
9 checks passed
@brant-livefront brant-livefront deleted the brant/BITAU-174-remove-shared-items-when-a-user-disables-sync branch October 7, 2024 18:29
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.

2 participants
0